Skip to content

Commit

Permalink
Fix bug in validate
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Dec 15, 2015
1 parent a56df05 commit 1ac7be1
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions TokenGuard.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,10 @@ public function id()
*/
public function validate(array $credentials = [])
{
if (! is_null($token)) {
$credentials = [$this->storageKey => $credentials[$this->inputKey]];
$credentials = [$this->storageKey => $credentials[$this->inputKey]];

if ($this->provider->retrieveByCredentials($credentials)) {
return true;
}
if ($this->provider->retrieveByCredentials($credentials)) {
return true;
}

return false;
Expand Down

0 comments on commit 1ac7be1

Please sign in to comment.