aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-10-04 22:31:12 -0400
committercash <cash.costello@gmail.com>2011-10-04 22:31:12 -0400
commitb4e997377b0d571eb7565fe75b7bd26aa28a33e9 (patch)
tree3b1c137710115729756cb2b86a17da8596fba55b
parent0fd0dea6054a1f387e48993d00e20e6e8466b56c (diff)
downloadelgg-b4e997377b0d571eb7565fe75b7bd26aa28a33e9.tar.gz
elgg-b4e997377b0d571eb7565fe75b7bd26aa28a33e9.tar.bz2
Fixes #3898 checking whether the viewer is logged in before adding join/requet buttons
-rw-r--r--mod/groups/lib/groups.php2
1 files changed, 1 insertions, 1 deletions
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);