mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-10 03:53:26 -08:00
[Server] Serve the e-mail queue through the database interface (#7858)
This commit is contained in:
parent
9087d0d3fe
commit
526d528e96
4 changed files with 131 additions and 40 deletions
|
|
@ -780,6 +780,42 @@ public:
|
|||
return {};
|
||||
}
|
||||
|
||||
/** @brief One queued activation e-mail, with the address exactly as stored. */
|
||||
struct PendingActivationMailRecord
|
||||
{
|
||||
QString userName;
|
||||
QString emailAddress;
|
||||
QString token;
|
||||
};
|
||||
/** @brief One queued password-reset e-mail, identified by its queue row. */
|
||||
struct PendingPasswordResetRecord
|
||||
{
|
||||
qint64 rowId = 0;
|
||||
QString userName;
|
||||
QString emailAddress;
|
||||
QString token;
|
||||
};
|
||||
/** @brief Fills the queued activation e-mails; false when the query fails. */
|
||||
virtual bool getPendingActivationMails(QList<PendingActivationMailRecord> & /* mails */)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
/** @brief Fills the unsent password-reset e-mails; false when the query fails. */
|
||||
virtual bool getPendingPasswordResets(QList<PendingPasswordResetRecord> & /* resets */)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
/** @brief Deletes a delivered activation e-mail queue row; false when the statement fails. */
|
||||
virtual bool deleteActivationEmail(const QString & /* userName */)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
/** @brief Marks a password-reset queue row as emailed, by row id when known; false on failure. */
|
||||
virtual bool markPasswordResetEmailDelivered(const QString & /* userName */, qint64 /* rowId */)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual void clearSessionTables()
|
||||
{
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue