Merge remote-tracking branch 'upstream/master'
# Conflicts: # app/Services/UserOnlineService.php # public/assets/admin
This commit is contained in:
@@ -36,7 +36,7 @@ class LoginService
|
||||
}
|
||||
|
||||
// 查找用户
|
||||
$user = User::where('email', $email)->first();
|
||||
$user = User::byEmail($email)->first();
|
||||
if (!$user) {
|
||||
return [false, [400, __('Incorrect email or password')]];
|
||||
}
|
||||
@@ -99,7 +99,7 @@ class LoginService
|
||||
}
|
||||
|
||||
// 查找用户
|
||||
$user = User::where('email', $email)->first();
|
||||
$user = User::byEmail($email)->first();
|
||||
if (!$user) {
|
||||
return [false, [400, __('This email is not registered in the system')]];
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ class MailLinkService
|
||||
return [false, [429, __('Sending frequently, please try again later')]];
|
||||
}
|
||||
|
||||
$user = User::where('email', $email)->first();
|
||||
$user = User::byEmail($email)->first();
|
||||
if (!$user) {
|
||||
return [true, true]; // 成功但用户不存在,保护用户隐私
|
||||
}
|
||||
@@ -46,7 +46,7 @@ class MailLinkService
|
||||
|
||||
$this->sendMailLinkEmail($user, $link);
|
||||
|
||||
return [true, $link];
|
||||
return [true, true];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -91,8 +91,7 @@ class RegisterService
|
||||
}
|
||||
|
||||
// 检查邮箱是否存在
|
||||
$email = $request->input('email');
|
||||
$exist = User::where('email', $email)->first();
|
||||
$exist = User::byEmail($request->input('email'))->first();
|
||||
if ($exist) {
|
||||
return [false, [400201, __('Email already exists')]];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user