From 9a2fa152f1a2c0caad07d10d73e3dc676f157813 Mon Sep 17 00:00:00 2001 From: DarthArgus Date: Mon, 26 Dec 2016 14:55:08 -0600 Subject: [PATCH] fixups --- .../LoginServer/src/shared/ClientConnection.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/engine/server/application/LoginServer/src/shared/ClientConnection.cpp b/engine/server/application/LoginServer/src/shared/ClientConnection.cpp index 20f358cf..28d06c83 100755 --- a/engine/server/application/LoginServer/src/shared/ClientConnection.cpp +++ b/engine/server/application/LoginServer/src/shared/ClientConnection.cpp @@ -183,7 +183,10 @@ void ClientConnection::validateClient(const std::string & id, const std::string StationId suid = atoi(id.c_str()); static const std::string authURL(ConfigLoginServer::getExternalAuthUrl()); std::string uname; - + + std::string parentAccount; + std::vector childAccounts; + if (!authURL.empty()) { // create the object @@ -202,6 +205,9 @@ void ClientConnection::validateClient(const std::string & id, const std::string if (status && !uname.empty()) { authOK = true; + + parentAccount = api.getString("mainAccount"); + childAccounts = api.getStringVector("subAccounts"); } else { @@ -241,9 +247,6 @@ void ClientConnection::validateClient(const std::string & id, const std::string suid = h(uname.c_str()); } - std::string parentAccount = api.getString("mainAccount"); - vector childAccounts = api.getVector("subAccounts"); - if (childAccounts.size() == 0) { for (auto i = childAccounts.begin(); i != childAccounts.end(); ++i) { if (!i.empty()) {