diff --git a/README.md b/README.md index 3c482a2c..02967f9d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@  # Unity Web Portal -Unity Web Portal is a PHP application built in top of MariaDB and LDAP which acts as a central user portal for high-performance-computing clusters. Features include: +Unity Web Portal is a PHP application built on top of MariaDB and LDAP which acts as a central user portal for high-performance-computing clusters. Features include: * Automation of LDAP object/user creation with SSH public key configurations * Custom user group creation in LDAP * Cluster notices diff --git a/webroot/admin/pi-mgmt.php b/webroot/admin/pi-mgmt.php index dd8edd1c..a81d2a3a 100644 --- a/webroot/admin/pi-mgmt.php +++ b/webroot/admin/pi-mgmt.php @@ -115,6 +115,14 @@ getAllPIGroups($SQL, $MAILER); + function cmp($a, $b) { + return strcmp($a->name, $b->name); + return strcmp($a->getPIUID(), $b->getPIUID()); + } + + + usort($accounts, "cmp"); + foreach ($accounts as $pi_group) { $pi_user = $pi_group->getOwner(); diff --git a/webroot/admin/user-mgmt.php b/webroot/admin/user-mgmt.php index 5f9fbe71..8b087553 100644 --- a/webroot/admin/user-mgmt.php +++ b/webroot/admin/user-mgmt.php @@ -38,6 +38,13 @@ getAllUsers($SQL, $MAILER); +function cmp($a, $b) { + return strcmp($a->getUID(), $b->getUID()); + +} + +usort($users, "cmp"); + foreach ($users as $user) { echo "