diff options
author | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-30 21:32:54 +0000 |
---|---|---|
committer | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-30 21:32:54 +0000 |
commit | f49fdf4e1c80fe5bde922c25bdd6ca0e2c912ddb (patch) | |
tree | eb2fdb272ba76e83af60378d05602a26a265be36 /mod/notifications | |
parent | 9ebb6cff1cf22d4fb708c4ced37604c6cf5bbfae (diff) | |
download | elgg-f49fdf4e1c80fe5bde922c25bdd6ca0e2c912ddb.tar.gz elgg-f49fdf4e1c80fe5bde922c25bdd6ca0e2c912ddb.tar.bz2 |
Refs #2124: Using get_loggedin_user functions instead of $vars['user'], $_SESSION['user'], etc.
git-svn-id: http://code.elgg.org/elgg/trunk@7139 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/notifications')
4 files changed, 8 insertions, 8 deletions
diff --git a/mod/notifications/views/default/notifications/subscriptions/collections.php b/mod/notifications/views/default/notifications/subscriptions/collections.php index 4c5a0425a..713dff765 100644 --- a/mod/notifications/views/default/notifications/subscriptions/collections.php +++ b/mod/notifications/views/default/notifications/subscriptions/collections.php @@ -40,7 +40,7 @@ </tr> <?php $members = array(); - if ($friends = get_user_friends($vars['user']->guid, '', 9999, 0)) { + if ($friends = get_user_friends(get_loggedin_userid(), '', 9999, 0)) { foreach($friends as $friend) { $members[] = $friend->guid; } @@ -61,7 +61,7 @@ $i = 0; foreach($NOTIFICATION_HANDLERS as $method => $foo) { $metaname = 'collections_notifications_preferences_' . $method; - if ($collections_preferences = $vars['user']->$metaname) { + if ($collections_preferences = get_loggedin_user()->$metaname) { if (!empty($collections_preferences) && !is_array($collections_preferences)) { $collections_preferences = array($collections_preferences); } @@ -93,7 +93,7 @@ END; @todo collections removed from notifications - they are no longer used and will be replaced with shared access collections - if ($collections = get_user_access_collections($vars['user']->guid)) { + if ($collections = get_user_access_collections(get_loggedin_userid())) { foreach($collections as $collection) { $members = get_members_of_access_collection($collection->id, true); $memberno = sizeof($members); @@ -113,7 +113,7 @@ END; $i = 0; foreach($NOTIFICATION_HANDLERS as $method => $foo) { $metaname = 'collections_notifications_preferences_' . $method; - if ($collections_preferences = $vars['user']->$metaname) { + if ($collections_preferences = get_loggedin_user()->$metaname) { if (!empty($collections_preferences) && !is_array($collections_preferences)) { $collections_preferences = array($collections_preferences); } diff --git a/mod/notifications/views/default/notifications/subscriptions/forminternals.php b/mod/notifications/views/default/notifications/subscriptions/forminternals.php index 113d4b0fa..7cc393442 100644 --- a/mod/notifications/views/default/notifications/subscriptions/forminternals.php +++ b/mod/notifications/views/default/notifications/subscriptions/forminternals.php @@ -9,11 +9,11 @@ <?php // Get friends and subscriptions -$friends = get_user_friends($vars['user']->guid,'',9999,0); +$friends = get_user_friends(get_loggedin_userid(),'',9999,0); global $NOTIFICATION_HANDLERS; foreach($NOTIFICATION_HANDLERS as $method => $foo) { - $subsbig[$method] = elgg_get_entities_from_relationship(array('relationship' => 'notify' . $method, 'relationship_guid' => $vars['user']->guid, 'types' => 'user', 'limit' => 99999)); + $subsbig[$method] = elgg_get_entities_from_relationship(array('relationship' => 'notify' . $method, 'relationship_guid' => get_loggedin_userid(), 'types' => 'user', 'limit' => 99999)); } $subs = array(); diff --git a/mod/notifications/views/default/notifications/subscriptions/groupsform.php b/mod/notifications/views/default/notifications/subscriptions/groupsform.php index 7840ba2cc..b89350acb 100644 --- a/mod/notifications/views/default/notifications/subscriptions/groupsform.php +++ b/mod/notifications/views/default/notifications/subscriptions/groupsform.php @@ -7,7 +7,7 @@ global $NOTIFICATION_HANDLERS; foreach($NOTIFICATION_HANDLERS as $method => $foo) { - $subsbig[$method] = elgg_get_entities_from_relationship(array('relationship' => 'notify' . $method, 'relationship_guid' => $vars['user']->guid, 'types' => 'group', 'limit' => 99999)); + $subsbig[$method] = elgg_get_entities_from_relationship(array('relationship' => 'notify' . $method, 'relationship_guid' => get_loggedin_userid(), 'types' => 'group', 'limit' => 99999)); $tmparray = array(); if ($subsbig[$method]) { foreach($subsbig[$method] as $tmpent) { diff --git a/mod/notifications/views/default/notifications/subscriptions/personal.php b/mod/notifications/views/default/notifications/subscriptions/personal.php index e70207aa3..46c932f0b 100644 --- a/mod/notifications/views/default/notifications/subscriptions/personal.php +++ b/mod/notifications/views/default/notifications/subscriptions/personal.php @@ -38,7 +38,7 @@ foreach($NOTIFICATION_HANDLERS as $method => $foo) { $fields = ''; $i = 0; foreach($NOTIFICATION_HANDLERS as $method => $foo) { - if ($notification_settings = get_user_notification_settings($vars['user']->guid)) { + if ($notification_settings = get_user_notification_settings(get_loggedin_userid())) { if ($notification_settings->$method) { $personalchecked[$method] = 'checked="checked"'; } else { |