[pmwiki-users] Integrating AuthUser into existing site

Patrick R. Michaud pmichaud at pobox.com
Mon Oct 17 02:53:25 CDT 2005


On Mon, Oct 17, 2005 at 12:33:44AM -0700, Wesley Tanaka wrote:
> There's a section in Cookbook/AuthUser entitled "Interface with existing
> Authentification Process," but it doesn't explain how to do it.
> 
> What do I need to do to make sure users are logged into PmWiki, in addition to
> the rest of my site, without using any PmWiki password dialogs?

How is authentication currently being performed on the rest of your
site?

> >From looking at authuser.php, it appears that the right thing to do might be:
> 
> 1) $AuthUser = NULL;
> 2) include_once 'scripts/authuser.php';
> 3) AuthenticateUser($loggedinusername);
> 
> Is that the recommended way to do things?  I guess I should also try it out to
> see that this theory of mine even works.

If $loggedinusername is already initialized to the correct username,
then yes, this will do it.  However, you can also do simply

    $AuthId = $loggedinusername;

and it doesn't require loading in scripts/authuser.php.

Pm




More information about the pmwiki-users mailing list