Skip to content

Sort UID alphabetically #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
![alt text](https://user-images.githubusercontent.com/40907639/137608695-2d914da2-1ecc-480b-a47e-a9e33b2b1b45.png)

# 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
Expand Down
8 changes: 8 additions & 0 deletions webroot/admin/pi-mgmt.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@
<?php
$accounts = $LDAP->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();

Expand Down
7 changes: 7 additions & 0 deletions webroot/admin/user-mgmt.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@
<?php
$users = $LDAP->getAllUsers($SQL, $MAILER);

function cmp($a, $b) {
return strcmp($a->getUID(), $b->getUID());

}

usort($users, "cmp");

foreach ($users as $user) {
echo "<tr>";
echo "<td>" . $user->getFirstname() . " " . $user->getLastname() . "</td>";
Expand Down