mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2026-11-20 23:43:26 +03:00
should not need to pass in false here, as the init_session should have written mfa_complete to true etc
This commit is contained in:
1 parent
77ccefdbf2
commit
2ee2504e56
2 files changed
+3
-3
No files matched your search
@@ -70,14 +70,14 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
|
||||
init_session(authentication_get_username(false), true, true);
|
||||
|
||||
// get superadmin status and store in session
|
||||
$h->init(authentication_get_username(false));
|
||||
$h->init(authentication_get_username());
|
||||
if ($h->result()['superadmin'] == 1) {
|
||||
$_SESSION['sessid']['roles'][] = 'global-admin';
|
||||
}
|
||||
header("Location: main.php");
|
||||
exit(0);
|
||||
} else {
|
||||
error_log("PostfixAdmin admin second factor login failed (username: " . authentication_get_username(false) . ", ip_address: {$_SERVER['REMOTE_ADDR']})");
|
||||
error_log("PostfixAdmin admin second factor login failed (username: " . authentication_get_username(). ", ip_address: {$_SERVER['REMOTE_ADDR']})");
|
||||
$error = $PALANG['pTotp_failed'];
|
||||
flash_error($PALANG['pTotp_failed']);
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
|
||||
header("Location: main.php");
|
||||
exit(0);
|
||||
} else { # $h->login failed
|
||||
error_log("PostfixAdmin admin second factor login failed (username: " . authentication_get_username(false) . ", ip_address: {$_SERVER['REMOTE_ADDR']})");
|
||||
error_log("PostfixAdmin admin second factor login failed (username: " . authentication_get_username() . ", ip_address: {$_SERVER['REMOTE_ADDR']})");
|
||||
flash_error($PALANG['pTotp_failed']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user