Skip to content
Browse files

Better way of sorting countries

  • Loading branch information...
1 parent 096dc19 commit 7c3cf7f3ef9add9e2accb7d96ed958d16cb930a6 martin committed
Showing with 6 additions and 3 deletions.
  1. +6 −3 admin/user.php
View
9 admin/user.php
@@ -150,10 +150,13 @@
}
if ($sort == "country") { // Need to resort by full country name, not code
foreach ($users as $user) {
- $susers[$user->country] = $user;
+ $susers[$user->id] = $user->country;
}
- $users = $susers;
- ksort($users);
+ asort($susers);
+ foreach ($susers as $key => $value) {
+ $nusers[] = $users[$key];
+ }
+ $users = $nusers;
}
print_heading(get_string("chooseuser"));

0 comments on commit 7c3cf7f

Please sign in to comment.
Something went wrong with that request. Please try again.