正在显示
2 个修改的文件
包含
5 行增加
和
3 行删除
@@ -72,10 +72,9 @@ class Auth extends \fast\Auth | @@ -72,10 +72,9 @@ class Auth extends \fast\Auth | ||
72 | { | 72 | { |
73 | $admin = Admin::get(intval($this->id)); | 73 | $admin = Admin::get(intval($this->id)); |
74 | if (!$admin) { | 74 | if (!$admin) { |
75 | - return true; | 75 | + $admin->token = ''; |
76 | + $admin->save(); | ||
76 | } | 77 | } |
77 | - $admin->token = ''; | ||
78 | - $admin->save(); | ||
79 | $this->logined = false; //重置登录状态 | 78 | $this->logined = false; //重置登录状态 |
80 | Session::delete("admin"); | 79 | Session::delete("admin"); |
81 | Cookie::delete("keeplogin"); | 80 | Cookie::delete("keeplogin"); |
@@ -72,6 +72,9 @@ class User extends Api | @@ -72,6 +72,9 @@ class User extends Api | ||
72 | } | 72 | } |
73 | $user = \app\common\model\User::getByMobile($mobile); | 73 | $user = \app\common\model\User::getByMobile($mobile); |
74 | if ($user) { | 74 | if ($user) { |
75 | + if ($user->status != 'normal') { | ||
76 | + $this->error(__('Account is locked')); | ||
77 | + } | ||
75 | //如果已经有账号则直接登录 | 78 | //如果已经有账号则直接登录 |
76 | $ret = $this->auth->direct($user->id); | 79 | $ret = $this->auth->direct($user->id); |
77 | } else { | 80 | } else { |
-
请 注册 或 登录 后发表评论