From 757e1280a88b84c2a5cf86fdcf9b2b4f202937ba Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 11 Jul 2011 12:25:12 -0700 Subject: [PATCH] Refactor Auth class to use new bcrypt hashing. --- system/auth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/auth.php b/system/auth.php index 408930fd..c5ced635 100644 --- a/system/auth.php +++ b/system/auth.php @@ -59,11 +59,11 @@ public static function user() */ 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;