Browse Source

Make Eloquent auth driver respect a model's custom password getter.

This fixes #1140.
Franz Liedke 12 years ago
parent
commit
8e145e6c11
1 changed files with 1 additions and 1 deletions
  1. 1 1
      laravel/auth/drivers/eloquent.php

+ 1 - 1
laravel/auth/drivers/eloquent.php

@@ -50,7 +50,7 @@ class Eloquent extends Driver {
 
 		$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'));
 		}