diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-14 20:01:59 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-14 20:01:59 +0000 |
commit | b6aaba915151dd07800761a01b67ffffaee1302b (patch) | |
tree | 53c30035411460270278943f2427405233b34fac /engine/lib/sessions.php | |
parent | ffbd7cd4179a0186dc674c2d24f578660cc75df0 (diff) | |
download | elgg-b6aaba915151dd07800761a01b67ffffaee1302b.tar.gz elgg-b6aaba915151dd07800761a01b67ffffaee1302b.tar.bz2 |
merge -r5898:5928 (not excluding riverdashboard, notifications, and messageboard) from 1.7 to trunk.
git-svn-id: http://code.elgg.org/elgg/trunk@6058 36083f99-b078-4883-b0ff-0f9b5a30f544
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; } |