mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-20 03:36:20 +02:00
pass Login instance into TotpPf
This commit is contained in:
parent
bbb6e85904
commit
fc8e7cc271
@ -47,7 +47,8 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
|
||||
die('Invalid token!');
|
||||
}
|
||||
|
||||
$totppf = new TotpPf('mailbox');
|
||||
$login = new Login('mailbox');
|
||||
$totppf = new TotpPf('mailbox', $login);
|
||||
|
||||
$lang = safepost('lang');
|
||||
$fUsername = trim(safepost('fUsername'));
|
||||
@ -59,7 +60,6 @@ if ($_SERVER['REQUEST_METHOD'] == "POST") {
|
||||
# (language preference cookie is processed even if username and/or password are invalid)
|
||||
}
|
||||
|
||||
$login = new Login('mailbox');
|
||||
if ($login->login($fUsername, $fPassword)) {
|
||||
if ($totppf->usesTOTP($fUsername)) {
|
||||
init_session($fUsername, false, false);
|
||||
|
Loading…
Reference in New Issue
Block a user