]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #3898 checking whether the viewer is logged in before adding join/requet buttons
authorcash <cash.costello@gmail.com>
Wed, 5 Oct 2011 02:31:12 +0000 (22:31 -0400)
committercash <cash.costello@gmail.com>
Wed, 5 Oct 2011 02:31:12 +0000 (22:31 -0400)
mod/groups/lib/groups.php

index 86e6f018e2a1f7493380d7a8e7d457667583fb00..460eab65624540de42333ac9f3468527da0accd0 100644 (file)
@@ -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);