Re: #19161 [NEW]: Pear::Auth does not register session vars

From: Date: Sat, 31 Aug 2002 15:05:37 +0000
Subject: Re: #19161 [NEW]: Pear::Auth does not register session vars
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-8785@lists.php.net to get a copy of this message
I cannot close this bug right now (bugs.php.net down?), but this should be fixed in CVS. Give it a try and let me know. I forgot to import $session before I used it. -James On 28 Aug 2002 arnaud@limbourg.com wrote: > From: arnaud@limbourg.com > Operating system: Winnt 4 & Linux > PHP version: 4.2.1 > PHP Bug Type: PEAR related > Bug description: Pear::Auth does not register session vars > > In the Auth.php file the method setAuthData does not seem to register > additional data correctly. > > I made my own container based on a post from Martin a while ago now. It > fetches additionnal info and passes it to the setAuth method. > > >From the last cvs version of Auth.php setAuth now calls setAuthData (which > was not the case before). But this new way is not working because my data > never gets registered in the session. > > Here is the incriminated method > > function setAuthData($data) > { > if (isset($session['auth']['data'])) { > $olddata = $session['auth']['data']; > } else { > $olddata = null; > } > $session['auth']['data'] = $data; > die(var_dump::display($_SESSION)); > return $olddata; > } > > On the die i can see the base auth vars but not the $data ones. > > I tried setting $session['auth']['data'] = array() in setAuth but i just > end up having an empty array. > > When i do the var_dump on the $data parameter it contains the data i > expect. > > The 1.33 version of Auth.php did not have that problem. > > Arnaud. >

« previous php.pear.dev (#8785) next »