have zend auth store multiple values of identity
so basically when we use zend auth we can call function $auth->getIdentity() to get the ide开发者_JAVA百科ntity of the currently logged in user....the thing is...it would return the value that was set from setIdentity() function during authentication which usually is something like username or user id....my question is.....is it possible to store multiple variables for identity for instance store both username AND user id, so that I can retrieve either one of those to display to the user and/or to pass to other script
thanks in advance!
There is no spoon
-The matrix
You can even store the entire user
object if you wish. It's practically writing stuff into session:
$auth->authenticate( $authAdapter );
$auth->getStorage()->write( $user );
精彩评论