Skip to content

Commit

Permalink
Fix issue and remove unneccesary code. The (fixed) conditional doesn'…
Browse files Browse the repository at this point in the history
…t do anything, since if Hash::get returns null, the function still returns null.
  • Loading branch information
Spencer Ellinor committed Jul 25, 2012
1 parent 6c1b05a commit 8a41fb0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/Cake/Controller/Component/AuthComponent.php
Expand Up @@ -565,10 +565,7 @@ public static function user($key = null) {
if ($key === null) {
return $user;
}
if ($value = Hash::get($user, $key)) {
return $value;
}
return null;
return Hash::get($user, $key);
}

/**
Expand Down

0 comments on commit 8a41fb0

Please sign in to comment.