mirror of
https://github.com/delight-im/PHP-Auth.git
synced 2025-08-03 14:47:30 +02:00
In tests show whether 2FA is currently pending for any user
This commit is contained in:
@@ -825,7 +825,14 @@ function showDebugData(\Delight\Auth\Auth $auth, $result) {
|
|||||||
\var_dump($auth->isRemembered());
|
\var_dump($auth->isRemembered());
|
||||||
echo '$auth->getIpAddress()' . "\t\t\t";
|
echo '$auth->getIpAddress()' . "\t\t\t";
|
||||||
\var_dump($auth->getIpAddress());
|
\var_dump($auth->getIpAddress());
|
||||||
echo "\n";
|
echo 'Waiting for 2FA' . "\t\t\t\t";
|
||||||
|
if (!empty($_SESSION[\Delight\Auth\Auth::SESSION_FIELD_AWAITING_2FA_UNTIL]) && $_SESSION[\Delight\Auth\Auth::SESSION_FIELD_AWAITING_2FA_UNTIL] >= \time()) {
|
||||||
|
echo 'User #' . ((int) $_SESSION[\Delight\Auth\Auth::SESSION_FIELD_AWAITING_2FA_USER_ID]) . ' (' . ($_SESSION[\Delight\Auth\Auth::SESSION_FIELD_AWAITING_2FA_UNTIL] - \time()) . ' seconds)';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo 'No';
|
||||||
|
}
|
||||||
|
echo "\n\n";
|
||||||
|
|
||||||
echo 'Session name' . "\t\t\t\t";
|
echo 'Session name' . "\t\t\t\t";
|
||||||
\var_dump(\session_name());
|
\var_dump(\session_name());
|
||||||
|
Reference in New Issue
Block a user