diff --git a/backend.php b/backend.php
index 5a3725861..fc36d2e03 100644
--- a/backend.php
+++ b/backend.php
@@ -3384,6 +3384,12 @@
}
}
+ $sort = db_escape_string($_GET["sort"]);
+
+ if (!$sort || $sort == "undefined") {
+ $sort = "login";
+ }
+
print "
";
@@ -3413,9 +3419,9 @@
print "
|
- Login |
- Access Level |
- Last login |
";
+ Login |
+ Access Level |
+ Last login | ";
$lnum = 0;
diff --git a/prefs.js b/prefs.js
index a91d430cb..c6daa6b6b 100644
--- a/prefs.js
+++ b/prefs.js
@@ -157,7 +157,7 @@ function updateFeedList(sort_key) {
}
-function updateUsersList() {
+function updateUsersList(sort_key) {
if (!xmlhttp_ready(xmlhttp)) {
printLockingError();
@@ -168,7 +168,8 @@ function updateUsersList() {
// p_notify("Loading, please wait...");
- xmlhttp.open("GET", "backend.php?op=pref-users", true);
+ xmlhttp.open("GET", "backend.php?op=pref-users&sort="
+ + param_escape(sort_key), true);
xmlhttp.onreadystatechange=userlist_callback;
xmlhttp.send(null);