Skip to content

Commit

Permalink
Reverted back the Session Guard attempt. (I changed it accidentally. …
Browse files Browse the repository at this point in the history
…Good time to remember to code responsibly!)
  • Loading branch information
DarkGhostHunter committed Feb 5, 2020
1 parent a26ddd6 commit 5aead14
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/Illuminate/Auth/SessionGuard.php
Original file line number Diff line number Diff line change
Expand Up @@ -354,11 +354,13 @@ public function attempt(array $credentials = [], $remember = false)
{
$this->fireAttemptEvent($credentials, $remember);

// We will pass the credentials to the validation method, which will retrieve
// and validate the user. If the user is found and valid, we will get the
// user "last attempted", log him into the application and return true.
if ($this->validate($credentials)) {
$this->login($this->lastAttempted, $remember);
$this->lastAttempted = $user = $this->provider->retrieveByCredentials($credentials);

// If an implementation of UserInterface was returned, we'll ask the provider
// to validate the user against the given credentials, and if they are in
// fact valid we'll log the users into the application and return true.
if ($this->hasValidCredentials($user, $credentials)) {
$this->login($user, $remember);

return true;
}
Expand Down

0 comments on commit 5aead14

Please sign in to comment.