mirror of
https://github.com/slawkens/myaac.git
synced 2025-05-03 20:59:20 +02:00
add mail_lost_account_interval
This commit is contained in:
parent
957421a98c
commit
d7e6545156
@ -82,9 +82,4 @@ $config = array(
|
||||
//'Some Quest' => 123,
|
||||
//'Some Quest Two' => 456,
|
||||
), // quests list (displayed in character view), name => storage
|
||||
|
||||
// other
|
||||
'email_lai_sec_interval' => 60, // time in seconds between e-mails to one account from lost account interface, block spam
|
||||
|
||||
'npc' => array()
|
||||
);
|
||||
|
@ -59,7 +59,7 @@ elseif($action == 'step1' && $action_type == 'email')
|
||||
$minutesleft = floor($insec / 60);
|
||||
$secondsleft = $insec - ($minutesleft * 60);
|
||||
$timeleft = $minutesleft.' minutes '.$secondsleft.' seconds';
|
||||
echo 'Account of selected character (<b>'.$nick.'</b>) received e-mail in last '.ceil($config['email_lai_sec_interval'] / 60).' minutes. You must wait '.$timeleft.' before you can use Lost Account Interface again.';
|
||||
echo 'Account of selected character (<b>'.$nick.'</b>) received e-mail in last '.ceil(setting('core.mail_lost_account_interval') / 60).' minutes. You must wait '.$timeleft.' before you can use Lost Account Interface again.';
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -104,7 +104,7 @@ elseif($action == 'sendcode')
|
||||
if(_mail($account_mail, $config['lua']['serverName'].' - Recover your account', $mailBody))
|
||||
{
|
||||
$account->setCustomField('email_code', $newcode);
|
||||
$account->setCustomField('email_next', (time() + $config['email_lai_sec_interval']));
|
||||
$account->setCustomField('email_next', (time() + setting('core.mail_lost_account_interval')));
|
||||
echo '<br />Details about steps required to recover your account has been sent to <b>' . $account_mail . '</b>. You should receive this email within 15 minutes. Please check your inbox/spam directory.';
|
||||
}
|
||||
else
|
||||
@ -122,7 +122,7 @@ elseif($action == 'sendcode')
|
||||
$minutesleft = floor($insec / 60);
|
||||
$secondsleft = $insec - ($minutesleft * 60);
|
||||
$timeleft = $minutesleft.' minutes '.$secondsleft.' seconds';
|
||||
echo 'Account of selected character (<b>'.$nick.'</b>) received e-mail in last '.ceil($config['email_lai_sec_interval'] / 60).' minutes. You must wait '.$timeleft.' before you can use Lost Account Interface again.';
|
||||
echo 'Account of selected character (<b>'.$nick.'</b>) received e-mail in last '.ceil(setting('core.mail_lost_account_interval') / 60).' minutes. You must wait '.$timeleft.' before you can use Lost Account Interface again.';
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -533,6 +533,15 @@ Sent by MyAAC,<br/>
|
||||
'mail_enabled', '=', 'true',
|
||||
],
|
||||
],
|
||||
'mail_lost_account_interval' => [
|
||||
'name' => 'Default Account Premium Days',
|
||||
'type' => 'number',
|
||||
'desc' => 'Time in seconds between e-mails to one account from lost account interface, block spam',
|
||||
'default' => 60,
|
||||
'show_if' => [
|
||||
'mail_enabled', '=', 'true',
|
||||
],
|
||||
],
|
||||
[
|
||||
'type' => 'category',
|
||||
'title' => 'Accounts',
|
||||
|
Loading…
x
Reference in New Issue
Block a user