diff options
Diffstat (limited to 'engine/lib/sessions.php')
-rw-r--r-- | engine/lib/sessions.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/engine/lib/sessions.php b/engine/lib/sessions.php index b5b68ebe0..ffea2dcc2 100644 --- a/engine/lib/sessions.php +++ b/engine/lib/sessions.php @@ -60,8 +60,8 @@ class ElggSession implements ArrayAccess { return ElggSession::$__localcache[$key]; } - $value = null; - $value = trigger_plugin_hook('session:get', $key, null, $value); + $value = NULL; + $value = trigger_plugin_hook('session:get', $key, NULL, $value); ElggSession::$__localcache[$key] = $value; @@ -110,10 +110,11 @@ class ElggSession implements ArrayAccess { /** - * Return the current logged in user, or null if no user is logged in. + * Return the current logged in user, or NULL if no user is logged in. * * If no user can be found in the current session, a plugin hook - 'session:get' 'user' to give plugin * authors another way to provide user details to the ACL system without touching the session. + * @return ElggUser|NULL */ function get_loggedin_user() { global $SESSION; @@ -122,7 +123,7 @@ function get_loggedin_user() { return $SESSION['user']; } - return false; + return NULL; } /** @@ -133,8 +134,9 @@ function get_loggedin_user() { */ function get_loggedin_userid() { $user = get_loggedin_user(); - if ($user) + if ($user) { return $user->guid; + } return 0; } |