diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc
index 407a490a26..6bf55b8e6a 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 34b72d11c1..9d81c53f90 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 '';
+ $selected = "";
+ if ($pconfig['user_source'] == $authcfg['name']) $selected = "selected";
+ print '';
}
}
?>
-
+