summaryrefslogtreecommitdiffstats
path: root/usr/local/www/vpn_pppoe_users_edit.php
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/www/vpn_pppoe_users_edit.php')
-rwxr-xr-xusr/local/www/vpn_pppoe_users_edit.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/usr/local/www/vpn_pppoe_users_edit.php b/usr/local/www/vpn_pppoe_users_edit.php
index 816772b..ce43e08 100755
--- a/usr/local/www/vpn_pppoe_users_edit.php
+++ b/usr/local/www/vpn_pppoe_users_edit.php
@@ -35,6 +35,18 @@
##|*MATCH=vpn_pppoe_users_edit.php*
##|-PRIV
+function pppoe_users_sort() {
+ global $g, $config;
+
+ if (!is_array($config['pppoe']['user']))
+ return;
+
+ function usercmp($a, $b) {
+ return strcasecmp($a['name'], $b['name']);
+ }
+
+ usort($config['pppoe']['user'], "usercmp");
+}
require("guiconfig.inc");
@@ -103,6 +115,7 @@ if ($_POST) {
if ($_POST['password'])
$secretent['password'] = $_POST['password'];
+ pppoe_users_sort();
if (isset($id) && $a_secret[$id])
$a_secret[$id] = $secretent;
else
OpenPOWER on IntegriCloud