...
|
...
|
@@ -12,13 +12,14 @@ class IndexController extends QLib_Actions_Login |
|
|
public function loginAction()
|
|
|
{
|
|
|
$this->disableView();
|
|
|
|
|
|
$username = trim($this->_post('username'));
|
|
|
$inputPassword = trim($this->_post('password'));
|
|
|
$refer = trim($this->_post('refer'));
|
|
|
if (empty($username) || empty($inputPassword)) {
|
|
|
$this->helpLocation('账号和密码不能为空.', '/');
|
|
|
}
|
|
|
$profile = Adminx_Models_Profile_Client::getProfileByUsername($username);
|
|
|
$profile = Adminx_Models_Profile_Client::getProfileByUsername($username);
|
|
|
if (empty($profile)) {
|
|
|
$this->helpLocation('账号不存在或者被禁用.', '/');
|
|
|
}
|
...
|
...
|
@@ -32,9 +33,9 @@ class IndexController extends QLib_Actions_Login |
|
|
if ($profile['is_lock'] == 'Y') {
|
|
|
$this->helpLocation('账号已锁定请联系管理员.', '/');
|
|
|
}
|
|
|
/*if ((int)$profile['expires'] < time()) {
|
|
|
if ((int)$profile['expires'] < time()) {
|
|
|
$this->helpLocation('账号已过期请联系管理员.', '/');
|
|
|
}*/
|
|
|
}
|
|
|
#############################################
|
|
|
$cache = Q_Cache::factory('Memcached')->setPrefix('adminx' . '.' . 'profile');
|
|
|
#############################################
|
...
|
...
|
@@ -46,7 +47,8 @@ class IndexController extends QLib_Actions_Login |
|
|
if ($cache->get($logKey) > 3) {
|
|
|
Adminx_Models_Profile_Client::updateProfileLockByPid($profile['pid']);
|
|
|
}
|
|
|
$this->helpLocation('密码错误.');
|
|
|
$this->helpLocation('密码错误.', '/');
|
|
|
|
|
|
}
|
|
|
################################### BEGIN SET COOKIE ###############################################
|
|
|
$profile['signin_time'] = time();
|
...
|
...
|
|