Commit:    a7f3c67dfce30446d903413bd6658008251f3634
Author:    Peter Cowburn <sala...@php.net>         Wed, 7 Aug 2019 20:16:20 
+0100
Parents:   bd8fdb6f3a0b4e077895a39cc9e49c6661508773
Branches:  master

Link:       
http://git.php.net/?p=web/people.git;a=commitdiff;h=a7f3c67dfce30446d903413bd6658008251f3634

Log:
sort user listing by username

_batman_ takes first place!

Changed paths:
  M  include/misc.php


Diff:
diff --git a/include/misc.php b/include/misc.php
index fd51c0a..db57b81 100644
--- a/include/misc.php
+++ b/include/misc.php
@@ -32,6 +32,10 @@ function findAllUsers($page) {
         error($json["error"]);
     }
 
+    usort($json, function ($a, $b) {
+        return strcmp($a["username"], $b["username"]);
+    });
+
     $offset = ($page - 1) * 50;
     return array_slice($json, $offset, 50);
 }


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to