Commit 9fd503f5 authored by Taylor Otwell's avatar Taylor Otwell

Small clean-up in the auth configuration file.

parent aa55f344
......@@ -62,9 +62,11 @@ return array(
'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;
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment