change timeout for email resend to 10 Minutes

This commit is contained in:
einhornimmond 2021-07-14 11:46:48 +02:00
parent 593f8eab83
commit 28d651a2fb
2 changed files with 2 additions and 2 deletions

View File

@ -115,7 +115,7 @@ Poco::JSON::Object* JsonSendEmail::handle(Poco::Dynamic::Var params)
return stateWarning("email already sended");
}
else if (2 == r) {
return stateError("email already send less than a hour before");
return stateError("email already sent less than a 10 minutes before");
}
}
else if (emailType == model::EMAIL_CUSTOM_TEXT) {

View File

@ -425,7 +425,7 @@ int Session::sendResetPasswordEmail(Poco::AutoPtr<controller::User> user, bool p
auto email_verification_model = mEmailVerificationCodeObject->getModel();
if (email_already_send) {
auto time_elapsed = Poco::DateTime() - email_verification_model->getUpdated();
if (time_elapsed.totalHours() < 1) {
if (time_elapsed.totalMinutes() < 10) {
frequent_resend = true;
}
}