Fix #4903: Parse Email Addresses whenever used (#4932)

This commit is contained in:
Zach H 2023-12-09 00:52:47 -05:00 committed by GitHub
parent b73ef58567
commit 07a8cd0a5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 86 additions and 52 deletions

View file

@ -20,6 +20,7 @@
#include "servatrice.h"
#include "decklist.h"
#include "email_parser.h"
#include "featureset.h"
#include "isl_interface.h"
#include "main.h"
@ -627,7 +628,7 @@ void Servatrice::statusUpdate()
while (servDbSelQuery->next()) {
const QString userName = servDbSelQuery->value(0).toString();
const QString emailAddress = servDbSelQuery->value(1).toString();
const auto emailAddress = EmailParser::getParsedEmailAddress(servDbSelQuery->value(1).toString());
const QString token = servDbSelQuery->value(2).toString();
if (smtpClient->enqueueActivationTokenMail(userName, emailAddress, token)) {
@ -649,7 +650,7 @@ void Servatrice::statusUpdate()
while (forgotPwQuery->next()) {
const QString userName = forgotPwQuery->value(0).toString();
const QString emailAddress = forgotPwQuery->value(1).toString();
const auto emailAddress = EmailParser::getParsedEmailAddress(forgotPwQuery->value(1).toString());
const QString token = forgotPwQuery->value(2).toString();
if (smtpClient->enqueueForgotPasswordTokenMail(userName, emailAddress, token)) {