mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Small optimization, remove unneeded else
This commit is contained in:
parent
005c690d94
commit
2d78d59a7b
1 changed files with 6 additions and 6 deletions
|
@ -543,13 +543,13 @@ class AuthComponent extends Component {
|
||||||
|
|
||||||
if ($key == null) {
|
if ($key == null) {
|
||||||
return CakeSession::read(self::$sessionKey);
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue