mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 01:34:55 +02:00
19 lines
639 B
PHP
19 lines
639 B
PHP
<?php
|
|
defined('MYAAC') or die('Direct access not allowed!');
|
|
|
|
function lostAccountWriteCooldown(string $nick, int $time): void
|
|
{
|
|
global $twig;
|
|
|
|
$inSec = $time - time();
|
|
$minutesLeft = floor($inSec / 60);
|
|
$secondsLeft = $inSec - ($minutesLeft * 60);
|
|
$timeLeft = $minutesLeft.' minutes '.$secondsLeft.' seconds';
|
|
|
|
$timeRounded = ceil(setting('core.mail_lost_account_interval') / 60);
|
|
|
|
$twig->display('error_box.html.twig', [
|
|
'errors' => ["Account of selected character (<b>" . escapeHtml($nick) . "</b>) received e-mail in last $timeRounded minutes. You must wait $timeLeft before you can use Lost Account Interface again."]
|
|
]);
|
|
}
|