From: cash Date: Wed, 5 Oct 2011 02:31:12 +0000 (-0400) Subject: Fixes #3898 checking whether the viewer is logged in before adding join/requet buttons X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=b4e997377b0d571eb7565fe75b7bd26aa28a33e9;p=lorea%2Felgg.git Fixes #3898 checking whether the viewer is logged in before adding join/requet buttons --- diff --git a/mod/groups/lib/groups.php b/mod/groups/lib/groups.php index 86e6f018e..460eab656 100644 --- a/mod/groups/lib/groups.php +++ b/mod/groups/lib/groups.php @@ -435,7 +435,7 @@ function groups_register_profile_buttons($group) { $url = elgg_get_site_url() . "action/groups/leave?group_guid={$group->getGUID()}"; $url = elgg_add_action_tokens_to_url($url); $actions[$url] = 'groups:leave'; - } else { + } elseif (elgg_is_logged_in()) { // join - admins can always join. $url = elgg_get_site_url() . "action/groups/join?group_guid={$group->getGUID()}"; $url = elgg_add_action_tokens_to_url($url);