public function isLogged()
{
Addons::hook('passport_is_logged', array('login' => $login, 'password' => $password));
// 验证本地系统登录
if (intval($_SESSION['mid']) > 0 && $_SESSION['SITE_KEY'] == getSiteKey()) {
return true;
} elseif ($uid = $this->getCookieUid()) {
// 判断用户是否禁用
$isDisable = model('DisableUser')->isDisableUser($uid);
if ($isDisable) {
$this->error = '此用户已被禁用';
$this->logoutLocal();
return false;
}
return $this->_recordLogin($uid);
} else {
unset($_SESSION['mid']);
unset($_SESSION['SITE_KEY']);
return false;
}
}