Skip to content

Commit

Permalink
Merge pull request #182 from range-of-motion/cherry-pick-bf8e878
Browse files Browse the repository at this point in the history
Merge pull request #180 from range-of-motion/179-fix-internal-server-error-if-empty-inputs-during-login
  • Loading branch information
range-of-motion authored Jun 30, 2020
2 parents a16c5f6 + d70c9fc commit 1086fe3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/Http/Controllers/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ public function store(Request $request)

return redirect()->route('dashboard');
} else {
$user = $this->userRepository->getByEmail($request->input('email'));
if ($request->input('email')) {
$user = $this->userRepository->getByEmail($request->input('email'));

$this->loginAttemptRepository->create($user ? $user->id : null, $request->ip(), true);
$this->loginAttemptRepository->create($user ? $user->id : null, $request->ip(), true);
}

$request->flash();

Expand Down

0 comments on commit 1086fe3

Please sign in to comment.