mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-30 23:50:19 -07:00
Merge pull request #1244 from woogerboy21/multi_server_sessions_update
Multi Server Session Functionality
This commit is contained in:
@@ -532,7 +532,8 @@ bool Servatrice_DatabaseInterface::userSessionExists(const QString &userName)
|
||||
{
|
||||
// Call only after lockSessionTables().
|
||||
|
||||
QSqlQuery *query = prepareQuery("select 1 from {prefix}_sessions where user_name = :user_name and end_time is null");
|
||||
QSqlQuery *query = prepareQuery("select 1 from {prefix}_sessions where user_name = :user_name and id_server = :id_server and end_time is null");
|
||||
query->bindValue(":id_server", server->getServerId());
|
||||
query->bindValue(":user_name", userName);
|
||||
execSqlQuery(query);
|
||||
return query->next();
|
||||
|
||||
Reference in New Issue
Block a user