Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Groups are now sorted alphabetically and can list all web groups.

  • Loading branch information...
commit 735ba24e2959a98655109da726360a2c991d51c0 1 parent 64d5323
@adamfranco authored
Showing with 37 additions and 0 deletions.
  1. +7 −0 actions/list.php
  2. +30 −0 actions/list_web.php
View
7 actions/list.php
@@ -20,6 +20,13 @@
}
$groups = array_values($groups);
+// Sort the groups
+$sortKeys = array();
+foreach ($groups as $group)
+ $sortKeys[] = implode(' / ', dnToLevels($group['dn']));
+array_multisort($sortKeys, $groups);
+
+// PRint the groups
foreach ($groups as $group) {
printGroupHtml($ldap, $group);
}
View
30 actions/list_web.php
@@ -0,0 +1,30 @@
+<ul class='menu'>
+ <li><a href="<?php echo getUrl('list'); ?>">My Groups</a></li>
+ <li>All Web Groups</li>
+ <li><a href="<?php echo getUrl('list_all'); ?>">All Groups</a></li>
+</ul>
+
+<div id='groups'>
+
+<?php
+$groups = array();
+foreach ($ldapConfig['WritableGroupContainers'] as $baseDN) {
+ $query = '(objectClass=group)';
+ $groups = array_merge($groups, $ldap->search($query, $baseDN, array('cn', 'managedby', 'member')));
+}
+$groups = array_values($groups);
+
+// Sort the groups
+$sortKeys = array();
+foreach ($groups as $group)
+ $sortKeys[] = implode(' / ', dnToLevels($group['dn']));
+array_multisort($sortKeys, $groups);
+
+// Print the groups
+foreach ($groups as $group) {
+ printGroupHtml($ldap, $group);
+}
+
+?>
+
+</div>
Please sign in to comment.
Something went wrong with that request. Please try again.