Small optimization, remove unneeded else

This commit is contained in:
Ceeram 2011-05-27 23:13:57 +02:00
parent 005c690d94
commit 2d78d59a7b

View file

@ -543,14 +543,14 @@ 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;
}
}
/**
* Similar to AuthComponent::user() except if the session user cannot be found, connected authentication