diff options
Diffstat (limited to 'mod/groups')
-rw-r--r-- | mod/groups/lib/groups.php | 2 | ||||
-rw-r--r-- | mod/groups/views/default/forms/groups/edit.php | 13 |
2 files changed, 13 insertions, 2 deletions
diff --git a/mod/groups/lib/groups.php b/mod/groups/lib/groups.php index 7d5c3232c..0557d41eb 100644 --- a/mod/groups/lib/groups.php +++ b/mod/groups/lib/groups.php @@ -561,6 +561,8 @@ function groups_prepare_form_vars($group = null) { if ($group->access_id != ACCESS_PUBLIC && $group->access_id != ACCESS_LOGGED_IN) { // group only access - this is done to handle access not created when group is created $values['vis'] = ACCESS_PRIVATE; + } else { + $values['vis'] = $group->access_id; } $values['entity'] = $group; diff --git a/mod/groups/views/default/forms/groups/edit.php b/mod/groups/views/default/forms/groups/edit.php index 41d97e6c3..b2860b225 100644 --- a/mod/groups/views/default/forms/groups/edit.php +++ b/mod/groups/views/default/forms/groups/edit.php @@ -91,9 +91,18 @@ if (isset($vars['entity'])) { } if ($entity && ($owner_guid == elgg_get_logged_in_user_guid() || elgg_is_admin_logged_in())) { - $owner_guid = $vars['entity']->owner_guid; $members = array(); - foreach ($vars['entity']->getMembers(0) as $member) { + + $options = array( + 'relationship' => 'member', + 'relationship_guid' => $vars['entity']->getGUID(), + 'inverse_relationship' => true, + 'type' => 'user', + 'limit' => 0, + ); + + $batch = new ElggBatch('elgg_get_entities', $options); + foreach ($batch as $member) { $members[$member->guid] = "$member->name (@$member->username)"; } ?> |