Browse Source

Fix variable name in retrieve() method for Eloquent auth driver.

Franz Liedke 12 years ago
parent
commit
0f5de55d5b
1 changed files with 4 additions and 4 deletions
  1. 4 4
      laravel/auth/drivers/eloquent.php

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

@@ -14,13 +14,13 @@ class Eloquent extends Driver {
 	{
 	{
 		// We return an object here either if the passed token is an integer (ID)
 		// We return an object here either if the passed token is an integer (ID)
 		// or if we are passed a model object of the correct type
 		// or if we are passed a model object of the correct type
-		if (filter_var($id, FILTER_VALIDATE_INT) !== false)
+		if (filter_var($token, FILTER_VALIDATE_INT) !== false)
 		{
 		{
-			return $this->model()->find($id);
+			return $this->model()->find($token);
 		}
 		}
-		else if (get_class($id) == Config::get('auth.model'))
+		else if (get_class($token) == Config::get('auth.model'))
 		{
 		{
-			return $id;
+			return $token;
 		}
 		}
 	}
 	}