mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Add last_login column to user table and populate upon login
This commit is contained in:
parent
0f4dc18074
commit
bb0b626cee
6 changed files with 22 additions and 2 deletions
|
|
@ -880,3 +880,14 @@ void Servatrice_DatabaseInterface::updateUsersClientID(const QString &userName,
|
|||
execSqlQuery(query);
|
||||
|
||||
}
|
||||
|
||||
void Servatrice_DatabaseInterface::updateUsersLastLoginTime(const QString &userName)
|
||||
{
|
||||
if (!checkSql())
|
||||
return;
|
||||
|
||||
QSqlQuery *query = prepareQuery("update {prefix}_users set last_login = NOW() where name = :user_name");
|
||||
query->bindValue(":user_name", userName);
|
||||
execSqlQuery(query);
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue