Browse Source

Fix issue and remove unneccesary code. The (fixed) conditional doesn't do anything, since if Hash::get returns null, the function still returns null.

Spencer Ellinor 13 years ago
parent
commit
8a41fb0c34
1 changed files with 1 additions and 4 deletions
  1. 1 4
      lib/Cake/Controller/Component/AuthComponent.php

+ 1 - 4
lib/Cake/Controller/Component/AuthComponent.php

@@ -565,10 +565,7 @@ class AuthComponent extends Component {
 		if ($key === null) {
 			return $user;
 		}
-		if ($value = Hash::get($user, $key)) {
-			return $value;
-		}
-		return null;
+		return Hash::get($user, $key);
 	}
 
 /**