From b6aaba915151dd07800761a01b67ffffaee1302b Mon Sep 17 00:00:00 2001 From: brettp Date: Fri, 14 May 2010 20:01:59 +0000 Subject: 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 --- engine/lib/sessions.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'engine/lib/sessions.php') 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; } -- cgit v1.2.3