Small clean-up in the auth configuration file.
This commit is contained in:
parent
aa55f3441f
commit
9fd503f5b6
|
@ -62,9 +62,11 @@
|
|||
|
||||
'attempt' => function($username, $password, $config)
|
||||
{
|
||||
if ( ! is_null($user = User::where($config['username'], '=', $username)->first()))
|
||||
$user = User::where($config['username'], '=', $username)->first();
|
||||
|
||||
if ( ! is_null($user) and Hasher::check($password, $user->password))
|
||||
{
|
||||
if (Hasher::check($password, $user->password)) return $user;
|
||||
return $user;
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue