diff options
Diffstat (limited to 'mod/groups')
-rw-r--r-- | mod/groups/actions/addtogroup.php | 4 | ||||
-rw-r--r-- | mod/groups/actions/delete.php | 2 | ||||
-rw-r--r-- | mod/groups/actions/discussion/save.php | 2 | ||||
-rw-r--r-- | mod/groups/actions/edit.php | 2 | ||||
-rw-r--r-- | mod/groups/actions/groupskillinvitation.php | 2 | ||||
-rw-r--r-- | mod/groups/actions/groupskillrequest.php | 2 | ||||
-rw-r--r-- | mod/groups/actions/invite.php | 2 | ||||
-rw-r--r-- | mod/groups/actions/join.php | 2 | ||||
-rw-r--r-- | mod/groups/actions/joinrequest.php | 2 | ||||
-rw-r--r-- | mod/groups/actions/leave.php | 4 | ||||
-rw-r--r-- | mod/groups/lib/discussion.php | 2 | ||||
-rw-r--r-- | mod/groups/lib/groups.php | 2 | ||||
-rw-r--r-- | mod/groups/start.php | 14 | ||||
-rw-r--r-- | mod/groups/views/default/forms/groups/edit.php | 2 | ||||
-rw-r--r-- | mod/groups/views/default/forms/groups/invite.php | 2 | ||||
-rw-r--r-- | mod/groups/views/default/group/default.php | 2 | ||||
-rw-r--r-- | mod/groups/views/default/groups/invitationrequests.php | 2 | ||||
-rw-r--r-- | mod/groups/views/default/groups/profile/buttons.php | 2 | ||||
-rw-r--r-- | mod/groups/views/default/groups/profile/closed_membership.php | 2 | ||||
-rw-r--r-- | mod/groups/views/default/groups/side_menu.php | 6 |
20 files changed, 30 insertions, 30 deletions
diff --git a/mod/groups/actions/addtogroup.php b/mod/groups/actions/addtogroup.php index 651b90abb..d75c5fdb8 100644 --- a/mod/groups/actions/addtogroup.php +++ b/mod/groups/actions/addtogroup.php @@ -4,7 +4,7 @@ * * @package ElggGroups */ -$logged_in_user = get_loggedin_user(); +$logged_in_user = elgg_get_logged_in_user_entity(); $user_guid = get_input('user_guid'); if (!is_array($user_guid)) @@ -20,7 +20,7 @@ if (sizeof($user_guid)) { if ($user && $group) { - //if (get_loggedin_userid() == $group->owner_guid) + //if (elgg_get_logged_in_user_guid() == $group->owner_guid) if ($group->canEdit()) { // If the group is open or the user has requested membership diff --git a/mod/groups/actions/delete.php b/mod/groups/actions/delete.php index 5672e8c47..a99b3a2c6 100644 --- a/mod/groups/actions/delete.php +++ b/mod/groups/actions/delete.php @@ -16,5 +16,5 @@ if (($entity) && ($entity instanceof ElggGroup)) else register_error(elgg_echo('group:notdeleted')); -$url_name = get_loggedin_user()->username; +$url_name = elgg_get_logged_in_user_entity()->username; forward(elgg_get_site_url() . "pg/groups/member/{$url_name}"); diff --git a/mod/groups/actions/discussion/save.php b/mod/groups/actions/discussion/save.php index 8e8f08a50..f553b562c 100644 --- a/mod/groups/actions/discussion/save.php +++ b/mod/groups/actions/discussion/save.php @@ -67,7 +67,7 @@ elgg_clear_sticky_form('topic'); // handle results differently for new topics and topic edits if ($new_topic) { system_message(elgg_echo('discussion:topic:created')); - add_to_river('river/forum/topic/create', 'create', get_loggedin_userid(), $topic->guid); + add_to_river('river/forum/topic/create', 'create', elgg_get_logged_in_user_guid(), $topic->guid); } else { system_message(elgg_echo('discussion:topic:updated')); } diff --git a/mod/groups/actions/edit.php b/mod/groups/actions/edit.php index c8a68d238..e10739244 100644 --- a/mod/groups/actions/edit.php +++ b/mod/groups/actions/edit.php @@ -34,7 +34,7 @@ foreach ($CONFIG->group as $shortname => $valuetype) { $input['name'] = get_input('name'); $input['name'] = html_entity_decode($input['name'], ENT_COMPAT, 'UTF-8'); -$user = get_loggedin_user(); +$user = elgg_get_logged_in_user_entity(); $group_guid = (int)get_input('group_guid'); $new_group_flag = $group_guid == 0; diff --git a/mod/groups/actions/groupskillinvitation.php b/mod/groups/actions/groupskillinvitation.php index 503c41939..516490bc9 100644 --- a/mod/groups/actions/groupskillinvitation.php +++ b/mod/groups/actions/groupskillinvitation.php @@ -5,7 +5,7 @@ * @package ElggGroups */ -$user_guid = get_input('user_guid', get_loggedin_userid()); +$user_guid = get_input('user_guid', elgg_get_logged_in_user_guid()); $group_guid = get_input('group_guid'); $user = get_entity($user_guid); diff --git a/mod/groups/actions/groupskillrequest.php b/mod/groups/actions/groupskillrequest.php index f7f8a5157..9d45bb25f 100644 --- a/mod/groups/actions/groupskillrequest.php +++ b/mod/groups/actions/groupskillrequest.php @@ -5,7 +5,7 @@ * @package ElggGroups */ -$user_guid = get_input('user_guid', get_loggedin_userid()); +$user_guid = get_input('user_guid', elgg_get_logged_in_user_guid()); $group_guid = get_input('group_guid'); $user = get_entity($user_guid); diff --git a/mod/groups/actions/invite.php b/mod/groups/actions/invite.php index e8eeb3330..1f8281071 100644 --- a/mod/groups/actions/invite.php +++ b/mod/groups/actions/invite.php @@ -5,7 +5,7 @@ * @package ElggGroups */ -$logged_in_user = get_loggedin_user(); +$logged_in_user = elgg_get_logged_in_user_entity(); $user_guid = get_input('user_guid'); if (!is_array($user_guid)) { diff --git a/mod/groups/actions/join.php b/mod/groups/actions/join.php index e058cdc22..72294c3ad 100644 --- a/mod/groups/actions/join.php +++ b/mod/groups/actions/join.php @@ -5,7 +5,7 @@ * @package ElggGroups */ -$user_guid = get_input('user_guid', get_loggedin_userid()); +$user_guid = get_input('user_guid', elgg_get_logged_in_user_guid()); $group_guid = get_input('group_guid'); // @todo fix for #287 diff --git a/mod/groups/actions/joinrequest.php b/mod/groups/actions/joinrequest.php index c1d41e8e8..1631712b6 100644 --- a/mod/groups/actions/joinrequest.php +++ b/mod/groups/actions/joinrequest.php @@ -5,7 +5,7 @@ * @package ElggGroups */ -$user_guid = get_input('user_guid', get_loggedin_userid()); +$user_guid = get_input('user_guid', elgg_get_logged_in_user_guid()); $group_guid = get_input('group_guid'); diff --git a/mod/groups/actions/leave.php b/mod/groups/actions/leave.php index a9163a3d1..390870df1 100644 --- a/mod/groups/actions/leave.php +++ b/mod/groups/actions/leave.php @@ -10,7 +10,7 @@ $group_guid = get_input('group_guid'); $user = NULL; if (!$user_guid) { - $user = get_loggedin_user(); + $user = elgg_get_logged_in_user_entity(); } else { $user = get_entity($user_guid); } @@ -20,7 +20,7 @@ $group = get_entity($group_guid); set_page_owner($group->guid); if (($user instanceof ElggUser) && ($group instanceof ElggGroup)) { - if ($group->getOwnerGUID() != get_loggedin_userid()) { + if ($group->getOwnerGUID() != elgg_get_logged_in_user_guid()) { if ($group->leave($user)) { system_message(elgg_echo("groups:left")); } else { diff --git a/mod/groups/lib/discussion.php b/mod/groups/lib/discussion.php index 4a3cd989a..62b0552e0 100644 --- a/mod/groups/lib/discussion.php +++ b/mod/groups/lib/discussion.php @@ -169,7 +169,7 @@ function discussion_handle_view_page($guid) { if ($topic->status == 'closed') { $content .= elgg_view_comments($topic, false); $content .= elgg_view('discussion/closed'); - } elseif ($group->isMember() || isadminloggedin()) { + } elseif ($group->isMember() || elgg_is_admin_logged_in()) { $content .= elgg_view_comments($topic); } else { $content .= elgg_view_comments($topic, false); diff --git a/mod/groups/lib/groups.php b/mod/groups/lib/groups.php index cff7fe258..8faba3179 100644 --- a/mod/groups/lib/groups.php +++ b/mod/groups/lib/groups.php @@ -121,7 +121,7 @@ function groups_handle_edit_page($page, $guid = 0) { gatekeeper(); if ($page == 'add') { - elgg_set_page_owner_guid(get_loggedin_userid()); + elgg_set_page_owner_guid(elgg_get_logged_in_user_guid()); $title = elgg_echo('groups:add'); elgg_push_breadcrumb($title); $content = elgg_view('groups/edit'); diff --git a/mod/groups/start.php b/mod/groups/start.php index 5e318a5f1..44b5363dc 100644 --- a/mod/groups/start.php +++ b/mod/groups/start.php @@ -130,14 +130,14 @@ function groups_submenus() { if (elgg_get_context() == 'groups') { if ($page_owner instanceof ElggGroup) { - if (isloggedin() && $page_owner->canEdit() && !$page_owner->isPublicMembership()) { + if (elgg_is_logged_in() && $page_owner->canEdit() && !$page_owner->isPublicMembership()) { $url = elgg_get_site_url() . "pg/groups/requests/{$page_owner->getGUID()}"; add_submenu_item(elgg_echo('groups:membershiprequests'), $url, 'groupsactions1'); } } else { add_submenu_item(elgg_echo('groups:all'), "pg/groups/world/", 'groupslinks1'); - if ($user = get_loggedin_user()) { + if ($user = elgg_get_logged_in_user_entity()) { add_submenu_item(elgg_echo('groups:owned'), "pg/groups/owned/$user->username", 'groupslinks1'); add_submenu_item(elgg_echo('groups:yours'), "pg/groups/member/$user->username", 'groupslinks1'); add_submenu_item(elgg_echo('groups:invitations'), "pg/groups/invitations/$user->username", 'groupslinks1'); @@ -295,7 +295,7 @@ function groups_create_event_listener($event, $object_type, $object) { */ function groups_read_acl_plugin_hook($hook, $entity_type, $returnvalue, $params) { //error_log("READ: " . var_export($returnvalue)); - $user = get_loggedin_user(); + $user = elgg_get_logged_in_user_entity(); if ($user) { // Not using this because of recursion. // Joining a group automatically add user to ACL, @@ -319,7 +319,7 @@ function groups_read_acl_plugin_hook($hook, $entity_type, $returnvalue, $params) */ function groups_write_acl_plugin_hook($hook, $entity_type, $returnvalue, $params) { $page_owner = elgg_get_page_owner_entity(); - if (!$loggedin = get_loggedin_user()) { + if (!$loggedin = elgg_get_logged_in_user_entity()) { return $returnvalue; } @@ -646,7 +646,7 @@ function groupforumtopic_notify_message($hook, $entity_type, $returnvalue, $para if ($method == 'sms') { return elgg_echo("groupforumtopic:new") . ': ' . $url . " ({$owner->name}: {$title})"; } else { - return get_loggedin_user()->name . ' ' . elgg_echo("groups:viagroups") . ': ' . $title . "\n\n" . $msg . "\n\n" . $entity->getURL(); + return elgg_get_logged_in_user_entity()->name . ' ' . elgg_echo("groups:viagroups") . ': ' . $title . "\n\n" . $msg . "\n\n" . $entity->getURL(); } } return null; @@ -661,9 +661,9 @@ function groupforumtopic_notify_message($hook, $entity_type, $returnvalue, $para function groups_can_edit_discussion($entity, $group_owner) { //logged in user - $user = get_loggedin_userid(); + $user = elgg_get_logged_in_user_guid(); - if (($entity->owner_guid == $user) || $group_owner == $user || isadminloggedin()) { + if (($entity->owner_guid == $user) || $group_owner == $user || elgg_is_admin_logged_in()) { return true; } else { return false; diff --git a/mod/groups/views/default/forms/groups/edit.php b/mod/groups/views/default/forms/groups/edit.php index e0c90af8d..7d24a3c00 100644 --- a/mod/groups/views/default/forms/groups/edit.php +++ b/mod/groups/views/default/forms/groups/edit.php @@ -66,7 +66,7 @@ if ($group_profile_fields > 0) { if (get_plugin_setting('hidden_groups', 'groups') == 'yes') { $this_owner = $vars['entity']->owner_guid; if (!$this_owner) { - $this_owner = get_loggedin_userid(); + $this_owner = elgg_get_logged_in_user_guid(); } $access = array( ACCESS_FRIENDS => elgg_echo("access:friends:label"), diff --git a/mod/groups/views/default/forms/groups/invite.php b/mod/groups/views/default/forms/groups/invite.php index 8b8ccb665..2c89db384 100644 --- a/mod/groups/views/default/forms/groups/invite.php +++ b/mod/groups/views/default/forms/groups/invite.php @@ -8,7 +8,7 @@ $group = $vars['entity']; $owner = get_entity($vars['entity']->owner_guid); $forward_url = $group->getURL(); - $friends = get_loggedin_user()->getFriends('', 0); + $friends = elgg_get_logged_in_user_entity()->getFriends('', 0); if ($friends) { ?> diff --git a/mod/groups/views/default/group/default.php b/mod/groups/views/default/group/default.php index d025a894b..63e1e4226 100644 --- a/mod/groups/views/default/group/default.php +++ b/mod/groups/views/default/group/default.php @@ -25,7 +25,7 @@ $metadata = "<ul class=\"elgg-list-metadata\"><li>$mem</li>"; $metadata .= "<li>$num_members $members_string</li>"; // feature link -if (isadminloggedin()) { +if (elgg_is_admin_logged_in()) { if ($group->featured_group == "yes") { $url = "action/groups/featured?group_guid={$group->guid}&action_type=unfeature"; $wording = elgg_echo("groups:makeunfeatured"); diff --git a/mod/groups/views/default/groups/invitationrequests.php b/mod/groups/views/default/groups/invitationrequests.php index 9bb76e264..c65e8987e 100644 --- a/mod/groups/views/default/groups/invitationrequests.php +++ b/mod/groups/views/default/groups/invitationrequests.php @@ -1,7 +1,7 @@ <?php if (!empty($vars['invitations']) && is_array($vars['invitations'])) { - $user = get_loggedin_user(); + $user = elgg_get_logged_in_user_entity(); foreach($vars['invitations'] as $group) if ($group instanceof ElggGroup) { diff --git a/mod/groups/views/default/groups/profile/buttons.php b/mod/groups/views/default/groups/profile/buttons.php index b88c93ad1..bd7560bb8 100644 --- a/mod/groups/views/default/groups/profile/buttons.php +++ b/mod/groups/views/default/groups/profile/buttons.php @@ -5,7 +5,7 @@ * @uses $vars['entity'] */ -if (!isloggedin()) { +if (!elgg_is_logged_in()) { return true; } diff --git a/mod/groups/views/default/groups/profile/closed_membership.php b/mod/groups/views/default/groups/profile/closed_membership.php index f80103711..24526d378 100644 --- a/mod/groups/views/default/groups/profile/closed_membership.php +++ b/mod/groups/views/default/groups/profile/closed_membership.php @@ -9,7 +9,7 @@ <p class="mtm"> <?php echo elgg_echo('groups:closedgroup'); -if (isloggedin()) { +if (elgg_is_logged_in()) { echo ' ' . elgg_echo('groups:closedgroup:request'); } ?> diff --git a/mod/groups/views/default/groups/side_menu.php b/mod/groups/views/default/groups/side_menu.php index 99eb13a11..0ae2bef63 100644 --- a/mod/groups/views/default/groups/side_menu.php +++ b/mod/groups/views/default/groups/side_menu.php @@ -1,8 +1,8 @@ <ul class="submenu page_navigation"> <?php - if(isloggedin()){ - echo "<li><a href=\"".elgg_get_site_url()."pg/groups/member/{get_loggedin_user()->username}\">". elgg_echo('groups:yours') ."</a></li>"; - echo "<li><a href=\"".elgg_get_site_url()."pg/groups/invitations/{get_loggedin_user()->username}\">". elgg_echo('groups:invitations') ."</a></li>"; + if(elgg_is_logged_in()){ + echo "<li><a href=\"".elgg_get_site_url()."pg/groups/member/{elgg_get_logged_in_user_entity()->username}\">". elgg_echo('groups:yours') ."</a></li>"; + echo "<li><a href=\"".elgg_get_site_url()."pg/groups/invitations/{elgg_get_logged_in_user_entity()->username}\">". elgg_echo('groups:invitations') ."</a></li>"; } ?> </ul>
\ No newline at end of file |