Commit 757e1280 authored by Taylor Otwell's avatar Taylor Otwell

Refactor Auth class to use new bcrypt hashing.

parent 427fe625
......@@ -59,11 +59,11 @@ class Auth {
*/
public static function login($username, $password)
{
$model = forward_static_call(array(static::model(), 'where'), Config::get('auth.username'), '=', $username)->first();
$user = forward_static_call(array(static::model(), 'where'), Config::get('auth.username'), '=', $username)->first();
if ( ! is_null($user))
{
if ($user->password === Hash::make($password, $user->salt)->value)
if (Hash::check($password, $user->password))
{
static::$user = $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