aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/views/default/groups/profile/buttons.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/groups/views/default/groups/profile/buttons.php')
-rw-r--r--mod/groups/views/default/groups/profile/buttons.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/mod/groups/views/default/groups/profile/buttons.php b/mod/groups/views/default/groups/profile/buttons.php
index 0aef3920b..32d9867ab 100644
--- a/mod/groups/views/default/groups/profile/buttons.php
+++ b/mod/groups/views/default/groups/profile/buttons.php
@@ -31,14 +31,12 @@ if ($vars['entity']->isMember($user)) {
$actions[$url] = elgg_echo('groups:leave');
} else {
// join - admins can always join.
+ $url = elgg_get_site_url() . "action/groups/join?group_guid={$vars['entity']->getGUID()}";
+ $url = elgg_add_action_tokens_to_url($url);
if ($vars['entity']->isPublicMembership() || $vars['entity']->canEdit()) {
- $url = elgg_get_site_url() . "action/groups/join?group_guid={$vars['entity']->getGUID()}";
- $url = elgg_add_action_tokens_to_url($url);
$actions[$url] = elgg_echo('groups:join');
} else {
// request membership
- $url = elgg_get_site_url() . "action/groups/joinrequest?group_guid={$vars['entity']->getGUID()}";
- $url = elgg_add_action_tokens_to_url($url);
$actions[$url] = elgg_echo('groups:joinrequest');
}
}