Some code cleanup courtesy of PHPStorm.

This commit is contained in:
James Cole
2016-01-15 17:53:54 +01:00
parent 820722f44e
commit f69be86c74
12 changed files with 39 additions and 93 deletions

View File

@@ -66,15 +66,7 @@ class AuthController extends Controller
*/
public function login(Request $request)
{
$this->validate(
$request, [
$this->loginUsername() => 'required', 'password' => 'required',
]
);
// If the class is using the ThrottlesLogins trait, we can automatically throttle
// the login attempts for this application. We'll key this by the username and
// the IP address of the client making these requests into this application.
$this->validate($request, [$this->loginUsername() => 'required', 'password' => 'required',]);
$throttles = $this->isUsingThrottlesLoginsTrait();
if ($throttles && $this->hasTooManyLoginAttempts($request)) {
@@ -102,10 +94,6 @@ class AuthController extends Controller
$message = trans('firefly.' . $code . '_error', ['email' => $credentials['email']]);
}
// 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) {
$this->incrementLoginAttempts($request);
}