From 8e145e6c118d5416c95b0d1391a0c9cc0b0e1f18 Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Tue, 4 Sep 2012 16:36:17 +0300 Subject: [PATCH] Make Eloquent auth driver respect a model's custom password getter. This fixes #1140. --- laravel/auth/drivers/eloquent.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/laravel/auth/drivers/eloquent.php b/laravel/auth/drivers/eloquent.php index e376483e..35fe07d2 100644 --- a/laravel/auth/drivers/eloquent.php +++ b/laravel/auth/drivers/eloquent.php @@ -50,7 +50,7 @@ public function attempt($arguments = array()) $password_field = Config::get('auth.password', 'password'); - if ( ! is_null($user) and Hash::check($password, $user->get_attribute($password_field))) + if ( ! is_null($user) and Hash::check($password, $user->{$password_field})) { return $this->login($user->id, array_get($arguments, 'remember')); }