mirror of
https://github.com/slawkens/myaac.git
synced 2026-01-21 05:36:21 +01:00
[WIP] 2fa, separate files, move twigs
This commit is contained in:
17
system/pages/account/2fa/email/resend-code.php
Normal file
17
system/pages/account/2fa/email/resend-code.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
||||
require __DIR__ . '/../base.php';
|
||||
|
||||
if ($twoFactorAuth->hasRecentEmailCode(1 * 60)) {
|
||||
$errors = ['Sorry, one email per 15 minutes'];
|
||||
}
|
||||
else {
|
||||
$twoFactorAuth->resendEmailCode();
|
||||
}
|
||||
|
||||
if (!empty($errors)) {
|
||||
$twig->display('error_box.html.twig', ['errors' => $errors]);
|
||||
}
|
||||
|
||||
$twig->display('account/2fa/email/login.html.twig');
|
||||
Reference in New Issue
Block a user