[pmwiki-users] AuthUser login automated

Patrick R. Michaud pmichaud at pobox.com
Thu Aug 3 10:08:49 CDT 2006

On Wed, Aug 02, 2006 at 08:05:53PM +0200, Helge Larsen wrote:
> Hello Pm
> >> What do I do to make the login work, when I have the username and
> >> password in local variables ?
> >
> >SessionAuth($pagename, array('authid' => $username));
> This works fine.
> I have olso tried calling:
> 	AuthUserId($pagename, $username);
> This also works.
> The main difference between them is $_SESSION['authlist'] which is not
> set in the first case. What is that variable used for ?

Oh yes, AuthUserId is probably better here.

'authlist' provides an array of all of the valid groups and identifiers
the current visitor is authenticated as.  So, my first line should've
probably included that parameter.  Still, I'd use AuthUserId instead, since
it's pretty much guaranteed to do the right thing always.


More information about the pmwiki-users mailing list