admin users begin
This commit is contained in:
@@ -29,7 +29,8 @@ class LoginRequest extends FormRequest
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'email' => ['required', 'string', 'email'],
|
||||
// 'email' => ['required', 'string', 'email'],
|
||||
'username' => ['required', 'string'],
|
||||
'password' => ['required', 'string'],
|
||||
];
|
||||
}
|
||||
@@ -45,11 +46,19 @@ class LoginRequest extends FormRequest
|
||||
{
|
||||
$this->ensureIsNotRateLimited();
|
||||
|
||||
if (! Auth::attempt($this->only('email', 'password'), $this->boolean('remember'))) {
|
||||
// if (! Auth::attempt($this->only('email', 'password'), $this->boolean('remember'))) {
|
||||
// RateLimiter::hit($this->throttleKey());
|
||||
|
||||
// throw ValidationException::withMessages([
|
||||
// 'email' => trans('auth.failed'),
|
||||
// ]);
|
||||
// }
|
||||
|
||||
if (! Auth::attempt($this->only('username', 'password'), $this->boolean('remember'))) {
|
||||
RateLimiter::hit($this->throttleKey());
|
||||
|
||||
throw ValidationException::withMessages([
|
||||
'email' => trans('auth.failed'),
|
||||
'username' => trans('auth.failed'),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user