[pmwiki-users] Integrating AuthUser into existing site

Patrick R. Michaud pmichaud at pobox.com
Mon Oct 17 03:10:09 CDT 2005


On Mon, Oct 17, 2005 at 01:06:49AM -0700, Wesley Tanaka wrote:
> > How is authentication currently being performed on the rest of your
> > site?
> 
> There's a heavily modified phpbb table which contains salted MD5 hashed
> passwords.  Upon entering the correct password, $_SESSION is used to store the
> user's information.  So it's easy to pull out the username of the currently
> logged in user as a variable.
> 
> > 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.
> 
> Is this (setting AuthId) the recommended procedure?

Yes.  The Authenticate() function in authuser.php just sets a
$_SESSION variable as well as setting $AuthId; since you already
have the authentication information in $_SESSION, you only need to
set $AuthId.

Pm




More information about the pmwiki-users mailing list