summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_usermanager_addprivs.php
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-06-30 18:15:14 +0000
committerErmal Luçi <eri@pfsense.org>2009-06-30 18:16:09 +0000
commit0d64af597505a0e9c21d48669aafc8e1448b102b (patch)
treedc7101c26d46efc532af66aaaadf7825bd8e8bf2 /usr/local/www/system_usermanager_addprivs.php
parentd44d94c5c51c7bd7c6de810abfe0c3266cf947b1 (diff)
downloadpfsense-0d64af597505a0e9c21d48669aafc8e1448b102b.zip
pfsense-0d64af597505a0e9c21d48669aafc8e1448b102b.tar.gz
Clear guiconfig from all sort junk functions and put them on the specific pages where they are needed.
Remove some sort functions not used.
Diffstat (limited to 'usr/local/www/system_usermanager_addprivs.php')
-rw-r--r--usr/local/www/system_usermanager_addprivs.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/usr/local/www/system_usermanager_addprivs.php b/usr/local/www/system_usermanager_addprivs.php
index 85238c3..123875b 100644
--- a/usr/local/www/system_usermanager_addprivs.php
+++ b/usr/local/www/system_usermanager_addprivs.php
@@ -35,6 +35,18 @@
##|*MATCH=system_usermanager_addprivs.php*
##|-PRIV
+function admin_users_sort() {
+ global $g, $config;
+
+ if (!is_array($config['system']['user']))
+ return;
+
+ function cpusercmp($a, $b) {
+ return strcasecmp($a['name'], $b['name']);
+ }
+
+ usort($config['system']['user'], "cpusercmp");
+}
require("guiconfig.inc");
@@ -87,6 +99,7 @@ if ($_POST) {
else
$a_user['priv'] = array_merge($a_user['priv'], $pconfig['sysprivs']);
+ admin_users_sort();
local_user_set($a_user);
$retval = write_config();
$savemsg = get_std_save_message($retval);
OpenPOWER on IntegriCloud