From 8a41fb0c3462372d73d4bceea2a3963549769687 Mon Sep 17 00:00:00 2001 From: Spencer Ellinor Date: Wed, 25 Jul 2012 15:09:22 -0400 Subject: [PATCH] Fix issue and remove unneccesary code. The (fixed) conditional doesn't do anything, since if Hash::get returns null, the function still returns null. --- lib/Cake/Controller/Component/AuthComponent.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/Cake/Controller/Component/AuthComponent.php b/lib/Cake/Controller/Component/AuthComponent.php index 311b95a6cd1..c0869571f9a 100644 --- a/lib/Cake/Controller/Component/AuthComponent.php +++ b/lib/Cake/Controller/Component/AuthComponent.php @@ -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); } /**