diff --git a/lib/Cake/Controller/Component/AuthComponent.php b/lib/Cake/Controller/Component/AuthComponent.php index dbd1cdb4a..d3e71af4e 100644 --- a/lib/Cake/Controller/Component/AuthComponent.php +++ b/lib/Cake/Controller/Component/AuthComponent.php @@ -543,13 +543,13 @@ class AuthComponent extends Component { if ($key == null) { return CakeSession::read(self::$sessionKey); - } else { - $user = CakeSession::read(self::$sessionKey); - if (isset($user[$key])) { - return $user[$key]; - } - return null; } + + $user = CakeSession::read(self::$sessionKey); + if (isset($user[$key])) { + return $user[$key]; + } + return null; } /**