mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-30 18:43:55 -07:00
Multi Server Session Functionality
Fix #1130 Adds the server id in the SQL query for userSessionExists function.
This commit is contained in:
parent
f733daf18a
commit
217d8fa165
1 changed files with 3 additions and 2 deletions
|
|
@ -532,7 +532,8 @@ bool Servatrice_DatabaseInterface::userSessionExists(const QString &userName)
|
||||||
{
|
{
|
||||||
// Call only after lockSessionTables().
|
// 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);
|
query->bindValue(":user_name", userName);
|
||||||
execSqlQuery(query);
|
execSqlQuery(query);
|
||||||
return query->next();
|
return query->next();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue