#32 this time properly
This commit is contained in:
parent
eb49300a8a
commit
0e14ceed0c
|
@ -414,7 +414,7 @@ int main(int argc, char *argv[]) {
|
|||
ID_UPDATE_FREELANCER_PASSWORD_HASH
|
||||
});
|
||||
pqxx::result freelancerEmail = Database::executePreparedStatement_SELECT_FREELANCER_EMAIL_FROM_PASSWORD_RESET_KEY(databaseConnection, passwordResetKey);
|
||||
if (!freelancerEmail.empty() && !password.empty() && password.compare(passwordConfirmation) != 0) {
|
||||
if (!freelancerEmail.empty() && !password.empty() && password == passwordConfirmation) {
|
||||
string email = freelancerEmail.at(0).at(0).c_str();
|
||||
pqxx::result keyExpiration = Database::executePreparedStatement_SELECT_CHECK_FREELANCER_RESET_KEY_EXPIRED(databaseConnection, email);
|
||||
if (stoi(keyExpiration.at(0).at(0).c_str()) == 0) {
|
||||
|
@ -445,7 +445,7 @@ int main(int argc, char *argv[]) {
|
|||
ctx[MUSTACHE_PASSWORD_EMPTY] = true;
|
||||
if (freelancerEmail.empty())
|
||||
ctx[MUSTACHE_PASSWORD_RESET_DOES_NOT_EXIST] = true;
|
||||
if (password.compare(passwordConfirmation) != 0)
|
||||
if (password != passwordConfirmation)
|
||||
ctx[MUSTACHE_PASSWORD_RESET_PASS_CONFIRMATION] = true;
|
||||
}
|
||||
auto page = crow::mustache::load(TEMPLATE_PASSWORD_RESET_FULFILMENT);
|
||||
|
|
Loading…
Reference in New Issue