aboutsummaryrefslogtreecommitdiff
path: root/src/game/Level2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Level2.cpp')
-rw-r--r--src/game/Level2.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/game/Level2.cpp b/src/game/Level2.cpp
index 49ebc05e1d5..dc9d84bf4c8 100644
--- a/src/game/Level2.cpp
+++ b/src/game/Level2.cpp
@@ -2189,7 +2189,11 @@ bool ChatHandler::HandlePInfoCommand(const char* args)
uint32 security = 0;
std::string last_login = GetTrinityString(LANG_ERROR);
- QueryResult* result = loginDatabase.PQuery("SELECT username,gmlevel,email,last_ip,last_login FROM account WHERE id = '%u'",accId);
+ QueryResult* result = loginDatabase.PQuery("SELECT a.username,aa.gmlevel,a.email,a.last_ip,a.last_login "
+ "FROM account a "
+ "LEFT JOIN account_access aa "
+ "ON (a.id = aa.id) "
+ "WHERE a.id = '%u'",accId);
if(result)
{
Field* fields = result->Fetch();