From b4e997377b0d571eb7565fe75b7bd26aa28a33e9 Mon Sep 17 00:00:00 2001 From: cash Date: Tue, 4 Oct 2011 22:31:12 -0400 Subject: Fixes #3898 checking whether the viewer is logged in before adding join/requet buttons --- mod/groups/lib/groups.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.3