|
|
@@ -178,13 +178,11 @@ class Login4uHandler extends BaseHandler
|
|
|
if (!$user) {
|
|
|
throw new \Exception('用户模型获取失败');
|
|
|
}
|
|
|
- if ($user->status2->value == STATUS2::Ban->value) {
|
|
|
- throw new \Exception('用户被封禁');
|
|
|
+ if ($user->status2->value == STATUS2::Normal->value) {
|
|
|
+ SessionApp::setLogin($user);
|
|
|
+ $sessionId = SessionApp::getSessionId();
|
|
|
}
|
|
|
|
|
|
- SessionApp::setLogin($user);
|
|
|
- $sessionId = SessionApp::getSessionId();
|
|
|
-
|
|
|
// 5. 触发登录成功事件
|
|
|
Event::dispatch(new LoginSuccessEvent($user, $sessionId));
|
|
|
|