When forgot password, tell to wait for n seconds before resend

This commit is contained in:
Ibnu Maksum 2024-09-23 13:43:53 +07:00
parent 4567f82a06
commit aa1ef2c41c
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5
2 changed files with 3 additions and 1 deletions

View File

@ -98,6 +98,7 @@ a.n Ibnu Maksum
## SPONSORS ## SPONSORS
- [mixradius.com](https://mixradius.com/) Paid Services Billing Radius
- [mlink.id](https://mlink.id) - [mlink.id](https://mlink.id)
- [https://github.com/sonyinside](https://github.com/sonyinside) - [https://github.com/sonyinside](https://github.com/sonyinside)

View File

@ -30,8 +30,9 @@ if ($step == 1) {
if ($user) { if ($user) {
$otpPath .= sha1($username . $db_pass) . ".txt"; $otpPath .= sha1($username . $db_pass) . ".txt";
if (file_exists($otpPath) && time() - filemtime($otpPath) < 600) { if (file_exists($otpPath) && time() - filemtime($otpPath) < 600) {
$sec = time() - filemtime($otpPath);
$ui->assign('notify_t', 's'); $ui->assign('notify_t', 's');
$ui->assign('notify', Lang::T("If your Username is found, Verification Code has been Sent to Your Phone/Email/Whatsapp")); $ui->assign('notify', Lang::T("Verification Code already Sent to Your Phone/Email/Whatsapp, please wait")." $sec seconds.");
} else { } else {
$via = $config['user_notification_reminder']; $via = $config['user_notification_reminder'];
if ($via == 'email') { if ($via == 'email') {