massive improvements to tests, streamlined and synced migrations, fixed a lot of wrong or old table field references. implemented a lot of pages in react for website frontend
This commit is contained in:
@@ -41,7 +41,13 @@ class LoginRequest extends FormRequest
|
||||
$this->ensureIsNotRateLimited();
|
||||
|
||||
$credentials = $this->only('login', 'password');
|
||||
$credentials['login'] = $this->input('login');
|
||||
|
||||
if (filter_var($this->login, FILTER_VALIDATE_EMAIL)) {
|
||||
$credentials['email'] = $this->login;
|
||||
} else {
|
||||
$credentials['username'] = $this->login;
|
||||
}
|
||||
unset($credentials['login']);
|
||||
|
||||
if (! Auth::attempt($credentials, $this->boolean('remember'))) {
|
||||
RateLimiter::hit($this->throttleKey());
|
||||
@@ -70,7 +76,7 @@ class LoginRequest extends FormRequest
|
||||
$seconds = RateLimiter::availableIn($this->throttleKey());
|
||||
|
||||
throw ValidationException::withMessages([
|
||||
'email' => __('auth.throttle', [
|
||||
'login' => __('auth.throttle', [
|
||||
'seconds' => $seconds,
|
||||
'minutes' => ceil($seconds / 60),
|
||||
]),
|
||||
|
||||
Reference in New Issue
Block a user