blob: 1e173fdd54a7a986bc02e576961bf6308bda0f51 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
<?php
/**
* Unsets container guids from all groups that aren't subgroups
*/
$groups = elgg_get_entities(array(
'type' => 'group',
'limit' => 0,
));
foreach($groups as $group) {
if (!elgg_instanceof($group->getContainerEntity(), 'group')) {
$group->container_guid = 0;
$group->save();
}
}
|