祝大家好日子,
我有以下代码将存储数据附加到Zend_Auth
对象
$auth = Zend_Auth::getInstance();
$dbAdapter = Zend_Db_Table::getDefaultAdapter();
$authAdapter = new Zend_Auth_Adapter_DbTable(
$dbAdapter,
'account',
'email',
'password',
'delete_flag=0'
);
//MD5(?) AND .. add this along with the prev where condn of delete flag...
$authAdapter->setIdentity($loginDataArray['email'])
->setCredential($loginDataArray['password']);
$result = $auth->authenticate($authAdapter);
var_dump($result);
if ($result->isValid()) {
$authStorage = $auth->getStorage();
// the details you wan to store in the session
$userDetails = array();
$userDetails['account_id'] = $account_id;
$userDetails['email'] = $loginDataArray['email'];
$authStorage->write($userDetails);
}
现在,我如何在会话的后期添加更多数据。以后如何编辑同一个 Zend_Auth 对象。