mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-08-04 10:15:03 +02:00
10 minutes for request resend OTP, 20 minutes for expired
This commit is contained in:
parent
5070cd9ed7
commit
5242b19f6f
2 changed files with 4 additions and 4 deletions
|
@ -153,8 +153,8 @@ switch ($action) {
|
|||
$phoneFile = $otpPath . sha1($username . $db_pass) . "_phone.txt";
|
||||
|
||||
// expired 10 minutes
|
||||
if (file_exists($otpFile) && time() - filemtime($otpFile) < 1200) {
|
||||
r2(U . 'accounts/phone-update', 'e', Lang::T('Please wait ' . (1200 - (time() - filemtime($otpFile))) . ' seconds before sending another SMS'));
|
||||
if (file_exists($otpFile) && time() - filemtime($otpFile) < 600) {
|
||||
r2(U . 'accounts/phone-update', 'e', Lang::T('Please wait ' . (600 - (time() - filemtime($otpFile))) . ' seconds before sending another SMS'));
|
||||
} else {
|
||||
$otp = rand(100000, 999999);
|
||||
file_put_contents($otpFile, $otp);
|
||||
|
|
|
@ -124,9 +124,9 @@ switch ($do) {
|
|||
}
|
||||
$otpPath .= sha1($username . $db_pass) . ".txt";
|
||||
//expired 10 minutes
|
||||
if (file_exists($otpPath) && time() - filemtime($otpPath) < 1200) {
|
||||
if (file_exists($otpPath) && time() - filemtime($otpPath) < 600) {
|
||||
$ui->assign('username', $username);
|
||||
$ui->assign('notify', 'Please wait ' . (1200 - (time() - filemtime($otpPath))) . ' seconds before sending another SMS');
|
||||
$ui->assign('notify', 'Please wait ' . (600 - (time() - filemtime($otpPath))) . ' seconds before sending another SMS');
|
||||
$ui->assign('notify_t', 'd');
|
||||
$ui->display('register-otp.tpl');
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue