aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2013-02-27 10:49:26 -0500
committerBrett Profitt <brett.profitt@gmail.com>2013-02-27 10:49:26 -0500
commit05dd511d383c0bfb5f20fcbc5436bb25c79d078e (patch)
tree4f3e4fac1a809d119d400d5832f648700b68d7b7
parent8f7bd6a446c85d8200e384ad320ea2507a850b0e (diff)
downloadelgg-05dd511d383c0bfb5f20fcbc5436bb25c79d078e.tar.gz
elgg-05dd511d383c0bfb5f20fcbc5436bb25c79d078e.tar.bz2
Fixes #4977. Switched to ElggBatch for group ownership transfer.
-rw-r--r--mod/groups/views/default/forms/groups/edit.php13
1 files changed, 11 insertions, 2 deletions
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)";
}
?>