From 2d78d59a7b1d2b9fb11ee8c594b651b022357ac4 Mon Sep 17 00:00:00 2001 From: Ceeram Date: Fri, 27 May 2011 23:13:57 +0200 Subject: [PATCH] Small optimization, remove unneeded else --- lib/Cake/Controller/Component/AuthComponent.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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; } /**