Permalink
Browse files

Small optimization, remove unneeded else

  • Loading branch information...
1 parent 005c690 commit 2d78d59a7b1d2b9fb11ee8c594b651b022357ac4 @ceeram ceeram committed May 27, 2011
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/Cake/Controller/Component/AuthComponent.php
@@ -543,13 +543,13 @@ public static function user($key = null) {
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;
}
/**

0 comments on commit 2d78d59

Please sign in to comment.