From a3fbdb2e20ba71c7cff65f02d126a11648ccf8a4 Mon Sep 17 00:00:00 2001 From: wlx Date: Thu, 15 Sep 2011 06:43:13 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=99=BB=E5=BD=95=E2=80=9C?= =?UTF-8?q?=E8=AE=B0=E4=BD=8F=E6=88=91=E2=80=9D=E5=8A=9F=E8=83=BD(ticket?= =?UTF-8?q?=20#151)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/default/controllers/AccountController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; }