[pmwiki-users] authuser

H. Fox haganfox at gmail.com
Tue Jun 21 17:29:40 CDT 2005


On 6/21/05, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Tue, Jun 21, 2005 at 01:31:43PM -0700, H. Fox wrote:
> > > If someone wants to set the author
> > > based on authentication then
> > >     # ...set passwords and authuser settings...
> > >     include_once('scripts/authuser.php');
> > >     if ($AuthId) {
> > >       $Author = $AuthId;
> > >       setcookie('author',$Author,0,'/');
> > >     }
> > > will do it.
> >
> > This does set the $Author, but the user can change it.  I had
> > discovered this alternative method.
> > if (@$_SESSION['authid']) $Author=$_SESSION['authid'];
> 
> Niiiiiice.

Sort of, except the session is not in session (as Cheech and Chong
would say) on subsequent page loads after the the user is
authenticated.  However

@session_start();
if (@$_SESSION['authid']) $Author=$_SESSION['authid'];

has the effect I was going for.  Does the session_start() line hurt anything?

Hagan

> 
> Pm
>




More information about the pmwiki-users mailing list