Re: PEAR Auth, new user data
| From: | Lorenzo Alberton | Date: | Wed, 03 Sep 2003 14:40:56 +0000 |
| Subject: | Re: PEAR Auth, new user data | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-7557@lists.php.net to get a copy of this message | ||
On Wed, 3 Sep 2003 09:08:25 -0500, jsWalter wrote:
> Is there a way to add a set of user data (team, level, active
> state, etc) to the authentication object?
>
> I thought there must be some generic way to pass in an array with
> this data so that I can access it via...
>
> $myAuth->team;
You may want to have a look at [get|set]AuthData()
It's not possible to have the custom variables accessed
via $auth variables like you want to do, but here's how
you can proceed:
//store:
$myAuth->setAuthData('myVarName', $myVarValue);
//retrieve:
$myVarValue = $myAuth->getAuthData('myVarName');
If you want it any different, you have to extend PEAR::Auth
with your own class.
Regards,
Lorenzo