diff options
-rw-r--r-- | etc/inc/vpn.inc | 5 | ||||
-rwxr-xr-x | usr/local/www/vpn_ipsec_mobile.php | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc index 407a490..6bf55b8 100644 --- a/etc/inc/vpn.inc +++ b/etc/inc/vpn.inc @@ -420,10 +420,11 @@ function vpn_ipsec_configure($ipchg = false) } /* end mode_cfg section */ - if ($a_client['user_source'] = "ldap") + if ($a_client['user_source'] != "system") { foreach ($config['system']['authserver'] as $authcfg) { - if ($authcfg['type'] == 'ldap') { + if ($authcfg['type'] == 'ldap' and $authcfg['name'] == $a_client['user_source']) + { $thisauthcfg = $authcfg; } } diff --git a/usr/local/www/vpn_ipsec_mobile.php b/usr/local/www/vpn_ipsec_mobile.php index 34b72d1..9d81c53 100755 --- a/usr/local/www/vpn_ipsec_mobile.php +++ b/usr/local/www/vpn_ipsec_mobile.php @@ -358,11 +358,13 @@ function login_banner_change() { <? foreach ($config['system']['authserver'] as $authcfg) { if ($authcfg['type'] == 'ldap') { - print '<option value="ldap">ldap</option>'; + $selected = ""; + if ($pconfig['user_source'] == $authcfg['name']) $selected = "selected"; + print '<option value="'.$authcfg['name'].'" '. $selected.'>'.$authcfg['name'].'</option>'; } } ?> - <option value="system"><?=gettext("system"); ?></option> + <option value="system" <?php if ($pconfig['user_source'] == 'system') echo "selected"; ?>><?=gettext("system"); ?></option> </select> </td> </tr> |