php - How to append data to Zend_Auth object -
good day all,
i have following code appends stores data zend_auth object
$auth = zend_auth::getinstance(); $dbadapter = zend_db_table::getdefaultadapter(); $authadapter = new zend_auth_adapter_dbtable( $dbadapter, 'account', 'email', 'password', 'delete_flag=0' ); //md5(?) , .. add along prev condn of delete flag... $authadapter->setidentity($logindataarray['email']) ->setcredential($logindataarray['password']); $result = $auth->authenticate($authadapter); var_dump($result); if ($result->isvalid()) { $authstorage = $auth->getstorage(); // details wan store in session $userdetails = array(); $userdetails['account_id'] = $account_id; $userdetails['email'] = $logindataarray['email']; $authstorage->write($userdetails); } now, how append more data in later part of session. how edit same zend_auth object later.
authentication state stored in registered auth storage. default zend_session. can session this
$namespace = new zend_session_namespace('zend_auth'); then somthing
$namespace->newname = "newvalue";
Comments
Post a Comment