Skip to content
Snippets Groups Projects
Unverified Commit 3849e67b authored by Peter Rotich's avatar Peter Rotich Committed by GitHub
Browse files

Merge pull request #4629 from pitbulk/develop

Improve the Staff login
parents 8573ec00 4ef3186f
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,8 @@ if($_POST) {
// Rotate the CSRF token (original cannot be reused)
$ost->getCSRF()->rotate();
}
if ($_POST && isset($_POST['userid'])) {
// Lookup support backends for this staff
$username = trim($_POST['userid']);
if ($user = StaffAuthenticationBackend::process($username,
......@@ -66,8 +67,11 @@ elseif ($_GET['do']) {
// Consider single sign-on authentication backends
elseif (!$thisstaff || !($thisstaff->getId() || $thisstaff->isValid())) {
if (($user = StaffAuthenticationBackend::processSignOn($errors, false))
&& ($user instanceof StaffSession))
Http::redirect($dest);
&& ($user instanceof StaffSession)) {
Http::redirect($dest);
} else if (isset($_SESSION['_staff']['auth']['msg'])) {
$msg = $_SESSION['_staff']['auth']['msg'];
}
}
// Browsers shouldn't suggest saving that username/password
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment