[pmwiki-users] [SEMI-SOLVED] Read page text variable before including authuser script...

pmwiki.johnny1000 at spamgourmet.com pmwiki.johnny1000 at spamgourmet.com
Wed Mar 8 01:28:30 PST 2023


Sorry about the double posting about this functionality.
An email server retained the first mail for many hours, so I thought it 
was lost, possibly to some spam filter, and tried sending a new 
rephrased version.

Anyway...

>> I would like to populate the $AuthUser array with usernames and
>> passwords from other PmWiki pages than SiteAdmin.AuthUser.
> 
> You can have usernames and passwords in pages other than 
> SiteAdmin.AuthUser.
> 
> Something like this in config.php, before including authuser.php:
> 
>    $AuthUserPageFmt = array('SiteAdmin.AuthUser', 'SiteAdmin.OtherUsers');
> 
> This will have AuthUser check in all listed pages, with the same 
> expected format as documented. If there are repetitions, later values 
> will replace previous ones.

Thank you. Petko, as ususal, for a fast and helpful answer :o)

$AuthUserPageFmt was exactly what I needed for this functionality.

For others looking for something like the same functionality, this code 
in config.php will authenticate through individual <group>.<username> 
pages, in stead of through the default single SiteAdmin.AuthUser page:

if ($_POST['authid']) {
     $AuthUserPageFmt = array("SomeGroup.{$_POST['authid']}");
}

>> is there any fairly easy PmWiki way to get a page text variable
>> _before_ including authuser.php, _without_ the AuthUser system getting
>> disabled?
> 
> Sorry, no.

It also is not needed for this functionality, now that I know about 
$AuthUserPageFmt :o)

Thanks again, Petko :o)




More information about the pmwiki-users mailing list