reselect last user on failed login

This commit is contained in:
Roland Gruber 2013-05-25 13:24:55 +00:00
parent 88c1bd9476
commit 649cb0a83a
1 changed files with 5 additions and 1 deletions

View File

@ -343,7 +343,11 @@ function display_LoginPage($config_object) {
$adminList[$text[0]] = $admins[$i];
}
}
$userSelect = new htmlSelect('username', $adminList);
$selectedAdmin = array();
if (isset($_POST['username']) && in_array($_POST['username'], $adminList)) {
$selectedAdmin = array($_POST['username']);
}
$userSelect = new htmlSelect('username', $adminList, $selectedAdmin);
$userSelect->setHasDescriptiveElements(true);
$userSelect->alignment = htmlElement::ALIGN_LEFT;
$table->addElement($userSelect);