[Server] Serve account self-service updates through the database interface

cmdAccountEdit assembled a dynamic UPDATE for the real name, email and country
columns in the socket handler, and cmdAccountImage wrote the avatar blob there
too. Add AccountUpdateRecord, updateUserAccount and setUserAvatar to
Server_DatabaseInterface with fail-closed defaults, implement them with the
previous query text and bind values, and keep the password gate, the email
permission check, the empty-edit early return and the in-memory userInfo updates
in the handler.
This commit is contained in:
Lukas Brübach 2026-11-10 01:35:51 +01:00
parent 4b5408aad1
commit d36b18c76e
4 changed files with 75 additions and 30 deletions

View file

@ -223,6 +223,8 @@ public:
const QString &newPassword,
bool newPasswordNeedsHash) override;
void setForcePasswordChange(const QString &user, bool force) override;
bool updateUserAccount(const QString &userName, const AccountUpdateRecord &update) override;
bool setUserAvatar(int userId, const QByteArray &image) override;
QList<ServerInfo_Ban> getUserBanHistory(const QString &userName) override;
bool addWarning(const QString userName,
const QString adminName,