aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/actions
diff options
context:
space:
mode:
Diffstat (limited to 'mod/groups/actions')
-rw-r--r--mod/groups/actions/edit.php9
-rw-r--r--mod/groups/actions/join.php2
2 files changed, 10 insertions, 1 deletions
diff --git a/mod/groups/actions/edit.php b/mod/groups/actions/edit.php
index b5502115b..7965625e8 100644
--- a/mod/groups/actions/edit.php
+++ b/mod/groups/actions/edit.php
@@ -54,6 +54,15 @@
exit;
}
+ // Group membership
+ switch (get_input('membership'))
+ {
+ case 0: $group->membership = 0;
+ case 1 :$group->membership = 1; break;
+ case 2:
+ default: $group->membership = 2;
+ }
+
// Get access
$group->access_id = get_input('access_id', 0);
diff --git a/mod/groups/actions/join.php b/mod/groups/actions/join.php
index 77d2e3021..84e770065 100644
--- a/mod/groups/actions/join.php
+++ b/mod/groups/actions/join.php
@@ -26,7 +26,7 @@
if (($user instanceof ElggUser) && ($group instanceof ElggGroup))
{
- if ($group->access_id == 2)
+ if ($group->isPublicMembership())
{
if ($group->join($user))
{