Skip to content

Commit

Permalink
Small optimization, remove unneeded else
Browse files Browse the repository at this point in the history
  • Loading branch information
ceeram committed May 27, 2011
1 parent 005c690 commit 2d78d59
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/Cake/Controller/Component/AuthComponent.php
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit 2d78d59

Please sign in to comment.