Skip to content

Commit

Permalink
Merge pull request #12037 from tomschlick/patch-3
Browse files Browse the repository at this point in the history
[5.2] dont increment login attempt if the user is locked out
  • Loading branch information
taylorotwell committed Jan 29, 2016
2 parents 1eb4a5f + c8b377f commit 226cd17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Illuminate/Foundation/Auth/AuthenticatesUsers.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function login(Request $request)
// the IP address of the client making these requests into this application.
$throttles = $this->isUsingThrottlesLoginsTrait();

if ($throttles && $this->hasTooManyLoginAttempts($request)) {
if ($throttles && $lockedOut = $this->hasTooManyLoginAttempts($request)) {
return $this->sendLockoutResponse($request);
}

Expand All @@ -78,7 +78,7 @@ public function login(Request $request)
// If the login attempt was unsuccessful we will increment the number of attempts
// to login and redirect the user back to the login form. Of course, when this
// user surpasses their maximum number of attempts they will get locked out.
if ($throttles) {
if ($throttles && ! $lockedOut) {
$this->incrementLoginAttempts($request);
}

Expand Down

0 comments on commit 226cd17

Please sign in to comment.