diff --git a/modals/user_mfa_modal.php b/modals/user_mfa_modal.php index a5f9987b..7808299d 100644 --- a/modals/user_mfa_modal.php +++ b/modals/user_mfa_modal.php @@ -1,8 +1,12 @@
"; + // Clear it so it doesn't persist on refresh + unset($_SESSION['alert_type']); + unset($_SESSION['alert_message']); +} + +// If the user just failed a TOTP verification, auto-open the modal: +if (!empty($_SESSION['show_mfa_modal'])) { + echo " + "; + unset($_SESSION['show_mfa_modal']); +} + require_once "includes/footer.php";