mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Check for null Array and move option system to top
This commit is contained in:
parent
2c189c8cb1
commit
f9199cd3ac
@ -355,16 +355,19 @@ function login_banner_change() {
|
||||
<td width="78%" class="vtable">
|
||||
<?=gettext("Source"); ?>:
|
||||
<select name="user_source" class="formselect" id="user_source">
|
||||
<?
|
||||
foreach ($config['system']['authserver'] as $authcfg) {
|
||||
if ($authcfg['type'] == 'ldap') {
|
||||
$selected = "";
|
||||
if ($pconfig['user_source'] == $authcfg['name']) $selected = "selected";
|
||||
print '<option value="'.$authcfg['name'].'" '. $selected.'>'.$authcfg['name'].'</option>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<option value="system" <?php if ($pconfig['user_source'] == 'system') echo "selected"; ?>><?=gettext("system"); ?></option>
|
||||
<?
|
||||
if (isset($config['system']['authserver']))
|
||||
{
|
||||
foreach ($config['system']['authserver'] as $authcfg) {
|
||||
if ($authcfg['type'] == 'ldap') {
|
||||
$selected = "";
|
||||
if ($pconfig['user_source'] == $authcfg['name']) $selected = "selected";
|
||||
print '<option value="'.$authcfg['name'].'" '. $selected.'>'.$authcfg['name'].'</option>';
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user