diff options
Diffstat (limited to 'mod/notifications')
9 files changed, 18 insertions, 18 deletions
diff --git a/mod/notifications/actions/groupsave.php b/mod/notifications/actions/groupsave.php index f39beb665..c304cb856 100644 --- a/mod/notifications/actions/groupsave.php +++ b/mod/notifications/actions/groupsave.php @@ -11,7 +11,7 @@ global $NOTIFICATION_HANDLERS;  // Get group memberships and condense them down to an array of guids  $groups = array(); -if ($groupmemberships = elgg_get_entities_from_relationship(array('relationship' => 'member', 'relationship_guid' => get_loggedin_userid(), 'types' => 'group', 'limit' => 9999))) { +if ($groupmemberships = elgg_get_entities_from_relationship(array('relationship' => 'member', 'relationship_guid' => elgg_get_logged_in_user_guid(), 'types' => 'group', 'limit' => 9999))) {  	foreach($groupmemberships as $groupmembership) {  		$groups[] = $groupmembership->guid;  	} @@ -24,9 +24,9 @@ foreach($NOTIFICATION_HANDLERS as $method => $foo) {  	if (!empty($groups)) {  		foreach($groups as $group) {  			if (in_array($group,$subscriptions[$method])) { -				add_entity_relationship(get_loggedin_userid(), 'notify'.$method, $group); +				add_entity_relationship(elgg_get_logged_in_user_guid(), 'notify'.$method, $group);  			} else { -				remove_entity_relationship(get_loggedin_userid(), 'notify'.$method, $group); +				remove_entity_relationship(elgg_get_logged_in_user_guid(), 'notify'.$method, $group);  			}  		}  	} diff --git a/mod/notifications/actions/save.php b/mod/notifications/actions/save.php index eddda9dc6..163b656aa 100644 --- a/mod/notifications/actions/save.php +++ b/mod/notifications/actions/save.php @@ -6,7 +6,7 @@   * @package ElggNotifications   */ -$user = get_loggedin_user(); +$user = elgg_get_logged_in_user_entity();  global $NOTIFICATION_HANDLERS;  foreach($NOTIFICATION_HANDLERS as $method => $foo) { diff --git a/mod/notifications/groups.php b/mod/notifications/groups.php index c4f59c049..a3d7b3cad 100644 --- a/mod/notifications/groups.php +++ b/mod/notifications/groups.php @@ -11,7 +11,7 @@ require_once(dirname(dirname(dirname(__FILE__))) . '/engine/start.php');  // Ensure only logged-in users can see this page  gatekeeper(); -set_page_owner(get_loggedin_userid()); +set_page_owner(elgg_get_logged_in_user_guid());  // Set the context to settings  elgg_set_context('settings'); @@ -21,7 +21,7 @@ $title = elgg_echo('notifications:subscriptions:changesettings:groups');  // Get the form  $people = array(); -$groupmemberships = elgg_get_entities_from_relationship(array('relationship' => 'member', 'relationship_guid' => get_loggedin_userid(), 'types' => 'group', 'limit' => 9999)); +$groupmemberships = elgg_get_entities_from_relationship(array('relationship' => 'member', 'relationship_guid' => elgg_get_logged_in_user_guid(), 'types' => 'group', 'limit' => 9999));  $form_body = elgg_view('notifications/subscriptions/groupsform',array('groups' => $groupmemberships));  $body = elgg_view('input/form',array( diff --git a/mod/notifications/index.php b/mod/notifications/index.php index 4536b8788..a0235632d 100644 --- a/mod/notifications/index.php +++ b/mod/notifications/index.php @@ -11,7 +11,7 @@ require_once(dirname(dirname(dirname(__FILE__))) . '/engine/start.php');  // Ensure only logged-in users can see this page  gatekeeper(); -set_page_owner(get_loggedin_userid()); +set_page_owner(elgg_get_logged_in_user_guid());  $js_url = elgg_view_get_simplecache_url('js', 'friendsPickerv1');  elgg_register_js($js_url, 'friendsPicker'); @@ -23,7 +23,7 @@ $title = elgg_echo('notifications:subscriptions:changesettings');  // Get the form  $people = array(); -if ($people_ents = elgg_get_entities_from_relationship(array('relationship' => 'notify', 'relationship_guid' => get_loggedin_userid(), 'types' => 'user', 'limit' => 99999))) { +if ($people_ents = elgg_get_entities_from_relationship(array('relationship' => 'notify', 'relationship_guid' => elgg_get_logged_in_user_guid(), 'types' => 'user', 'limit' => 99999))) {  	foreach($people_ents as $ent) {  		$people[] = $ent->guid;  	} diff --git a/mod/notifications/start.php b/mod/notifications/start.php index 00e981f7b..a200a6513 100644 --- a/mod/notifications/start.php +++ b/mod/notifications/start.php @@ -64,8 +64,8 @@ function notifications_page_handler($page) {   *   */  function notifications_plugin_pagesetup() { -	if (elgg_get_context() == "settings" && get_loggedin_userid()) { -		$user = get_loggedin_user(); +	if (elgg_get_context() == "settings" && elgg_get_logged_in_user_guid()) { +		$user = elgg_get_logged_in_user_entity();  		$params = array(  			'name' => '2_a_user_notify', diff --git a/mod/notifications/views/default/notifications/subscriptions/collections.php b/mod/notifications/views/default/notifications/subscriptions/collections.php index 55e330cab..765998e0e 100644 --- a/mod/notifications/views/default/notifications/subscriptions/collections.php +++ b/mod/notifications/views/default/notifications/subscriptions/collections.php @@ -42,7 +42,7 @@  	</tr>  <?php  	$members = array(); -	if ($friends = get_user_friends(get_loggedin_userid(), '', 9999, 0)) { +	if ($friends = get_user_friends(elgg_get_logged_in_user_guid(), '', 9999, 0)) {  		foreach($friends as $friend) {  			$members[] = $friend->guid;  		} @@ -63,7 +63,7 @@  	$i = 0;  	foreach($NOTIFICATION_HANDLERS as $method => $foo) {  		$metaname = 'collections_notifications_preferences_' . $method; -		if ($collections_preferences = get_loggedin_user()->$metaname) { +		if ($collections_preferences = elgg_get_logged_in_user_entity()->$metaname) {  			if (!empty($collections_preferences) && !is_array($collections_preferences)) {  				$collections_preferences = array($collections_preferences);  			} @@ -95,7 +95,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(get_loggedin_userid())) { +	if ($collections = get_user_access_collections(elgg_get_logged_in_user_guid())) {  		foreach($collections as $collection) {  			$members = get_members_of_access_collection($collection->id, true);  			$memberno = sizeof($members); @@ -115,7 +115,7 @@ END;  			$i = 0;  			foreach($NOTIFICATION_HANDLERS as $method => $foo) {  				$metaname = 'collections_notifications_preferences_' . $method; -				if ($collections_preferences = get_loggedin_user()->$metaname) { +				if ($collections_preferences = elgg_get_logged_in_user_entity()->$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 f0d391d0d..960b024db 100644 --- a/mod/notifications/views/default/notifications/subscriptions/forminternals.php +++ b/mod/notifications/views/default/notifications/subscriptions/forminternals.php @@ -11,11 +11,11 @@  <?php  // Get friends and subscriptions -$friends = get_user_friends(get_loggedin_userid(),'',9999,0); +$friends = get_user_friends(elgg_get_logged_in_user_guid(),'',9999,0);  global $NOTIFICATION_HANDLERS;  foreach($NOTIFICATION_HANDLERS as $method => $foo) { -	$subsbig[$method] = elgg_get_entities_from_relationship(array('relationship' => 'notify' . $method, 'relationship_guid' => get_loggedin_userid(), 'types' => 'user', 'limit' => 99999)); +	$subsbig[$method] = elgg_get_entities_from_relationship(array('relationship' => 'notify' . $method, 'relationship_guid' => elgg_get_logged_in_user_guid(), '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 b7b43cb66..632e34a54 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' => get_loggedin_userid(), 'types' => 'group', 'limit' => 99999)); +	$subsbig[$method] = elgg_get_entities_from_relationship(array('relationship' => 'notify' . $method, 'relationship_guid' => elgg_get_logged_in_user_guid(), '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 ee8d948b9..e75bda758 100644 --- a/mod/notifications/views/default/notifications/subscriptions/personal.php +++ b/mod/notifications/views/default/notifications/subscriptions/personal.php @@ -40,7 +40,7 @@ foreach($NOTIFICATION_HANDLERS as $method => $foo) {  $fields = '';  $i = 0;  foreach($NOTIFICATION_HANDLERS as $method => $foo) { -	if ($notification_settings = get_user_notification_settings(get_loggedin_userid())) { +	if ($notification_settings = get_user_notification_settings(elgg_get_logged_in_user_guid())) {  		if ($notification_settings->$method) {  			$personalchecked[$method] = 'checked="checked"';  		} else {  | 
