diff --git a/application/default/controllers/AccountController.php b/application/default/controllers/AccountController.php index 664809e2..d6432d90 100755 --- a/application/default/controllers/AccountController.php +++ b/application/default/controllers/AccountController.php @@ -162,15 +162,15 @@ class AccountController extends Zend_Controller_Action ->setIdentityColumn('username') ->setCredentialColumn('password'); $authAdapter->setIdentity($u)->setCredential(md5($p)); - if ($this->_request->getParam('remember')) { - $authNamespace = new Zend_Session_Namespace('westdc'); - $authNamespace->setExpirationSeconds(2592000); - } $result = $auth->authenticate($authAdapter); if ($result->isValid()) { // success: store database row to auth's storage $data = $authAdapter->getResultRowObject(null,'password'); $auth->getStorage()->write($data); + if ($this->_request->getParam('remember')) { + $authNamespace = new Zend_Session_Namespace('westdc'); + $authNamespace->setExpirationSeconds(2592000); + } $db->query("update users set ts_last_login=now() where username=?",array($u)); return true; }