fix to bugs with verification email resend

This commit is contained in:
Dario 2020-06-18 08:09:37 +02:00
parent 939e1dd9d0
commit c0c88b6838
2 changed files with 3 additions and 3 deletions

View File

@ -274,7 +274,7 @@ namespace controller {
// younger than 7 days, schedule for created + 7 days
else {
auto runDateTime = created + Poco::Timespan(7, 0, 0, 0, 0);
ServerConfig::g_CronJobsTimer.schedule(new VerificationEmailResendTimerTask(user_id), Poco::Timestamp(runDateTime.microsecond()));
ServerConfig::g_CronJobsTimer.schedule(new VerificationEmailResendTimerTask(user_id), Poco::Timestamp(runDateTime.timestamp()));
count_scheduled++;
}
}

View File

@ -90,7 +90,7 @@ namespace model {
throw Poco::NullValueException("EmailOptIn::_loadFromDB fieldNames empty or contain only one field");
}
select << "SELECT user_id, verification_code, email_opt_in_type_id, created, resend_count FROM " << getTableName()
select << "SELECT id, user_id, verification_code, email_opt_in_type_id, created, resend_count FROM " << getTableName()
<< " where " << fieldNames[0] << " = ? ";
if (conditionType == MYSQL_CONDITION_AND) {
for (int i = 1; i < fieldNames.size(); i++) {
@ -106,7 +106,7 @@ namespace model {
addError(new ParamError("EmailOptIn::_loadFromDB", "condition type not implemented", conditionType));
}
//<< " where " << fieldName << " = ?"
select , into(mUserId), into(mEmailVerificationCode), into(mType), into(mCreated), into(mResendCount);
select , into(mID), into(mUserId), into(mEmailVerificationCode), into(mType), into(mCreated), into(mResendCount);
return select;