aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/notification.php
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-11-14 19:03:58 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-11-14 19:03:58 +0000
commit9bd5aad2c3bdb4a283d2b15ed0f91e295099c9e2 (patch)
tree8cf4279f57f654d5435dacba4dc2bcb4030d2199 /engine/lib/notification.php
parent2d55e88e095aa1a6b4f58101077aab81788761c9 (diff)
downloadelgg-9bd5aad2c3bdb4a283d2b15ed0f91e295099c9e2.tar.gz
elgg-9bd5aad2c3bdb4a283d2b15ed0f91e295099c9e2.tar.bz2
* Introducing get_loggedin_user() and get_loggedin_userid()
* ACLs now using get_loggedin_user* * Some logic cleaned up * Some "Undefined..." messages cleaned up git-svn-id: https://code.elgg.org/elgg/trunk@2459 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/notification.php')
-rw-r--r--engine/lib/notification.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/engine/lib/notification.php b/engine/lib/notification.php
index 8eeb009c0..7f7238daa 100644
--- a/engine/lib/notification.php
+++ b/engine/lib/notification.php
@@ -137,8 +137,7 @@
{
$user_guid = (int)$user_guid;
- if ($user_guid == 0)
- $user_guid = $_SESSION['user']->guid;
+ if ($user_guid == 0) $user_guid = get_loggedin_userid();
$all_metadata = get_metadata_for_entity($user_guid);
if ($all_metadata)
@@ -173,11 +172,9 @@
{
$user_guid = (int)$user_guid;
$method = sanitise_string($method);
-
- if ($user_guid == 0)
- $user_guid = $_SESSION['user']->guid;
$user = get_entity($user_guid);
+ if (!$user) $user = get_loggedin_user();
if (($user) && ($user instanceof ElggUser))
{