On Friday 01 Apr 2011 16:15:34 Steve Rayner wrote:
> I have this to store persistent data for an authenticated user;
>
> // We're authenticated! Store details.
> $identity = $adapter->getResultRowObject();
> $authStorage = $auth->getStorage();
> $authStorage->write($identity);
>
> I would like to add one extra bit of info to the persistent storage.
> Is there any way i can append this to the stored $identity?
If you use the session storage, you can fetch the namespace of that storage:
$storage = $auth->getStorage();
$session = new Zend_Session_Namespace($storage->getNamespace());
$member = $storage->getMember();
// This is your identity
$identity = $session->{$member};
And furthermore add more data to the namespace:
$session->foo = 'bar';
$session->baz = array('bat');
Regards, Jurian
--
Jurian Sluiman
Soflomo - http://soflomo.com
--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]