From d57aa9a09c42cb2ecaa50bf8effbd1c1b20e4fca Mon Sep 17 00:00:00 2001 From: Stanislas Dolcini Date: Sat, 6 Oct 2018 15:08:46 +0200 Subject: [PATCH] Style fix --- .../login/class/connection_handler.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/code/web/public_php/login/class/connection_handler.php b/code/web/public_php/login/class/connection_handler.php index 12a8d12e3..08e64f263 100644 --- a/code/web/public_php/login/class/connection_handler.php +++ b/code/web/public_php/login/class/connection_handler.php @@ -70,36 +70,34 @@ class ConnectionHandler private function Login($login, $password, $clientApplication, $cp, $submittedLang) { - $res = false; $domainId = -1; // Client sent his login info if (checkUserValidity($login, $password, $clientApplication, $cp, $id, $reason, $priv, $extended, $domainId, $submittedLang)) { echo '0:' . $reason; } else { - // retrieve the domain info $domainInfo = getDomainInfo($domainId); - // if we need to create missing ring info if ($AutoCreateRingInfo) { CreateRing($domainInfo); } // store the web host for this domain - global $RingWebHost, $RingWebHostPHP; + global $RingWebHost; + global $RingWebHostPHP; + $RingWebHost = $domainInfo['web_host']; $RingWebHostPHP = $domainInfo['web_host_php']; $LSaddr = explode(":", $domainInfo['login_address']); // ask for a session cookie to the login service - $login = new LoginCb; - $res = ""; - $login->connect($LSaddr[0], $LSaddr[1], $res); - $login->login($id, $_SERVER["REMOTE_ADDR"], $domainId); + $loginCb = new LoginCb(); + $loginCb->connect($LSaddr[0], $LSaddr[1], ''); + $loginCb->login($id, $_SERVER['REMOTE_ADDR'], $domainId); // wait for the return message - if (!$login->waitCallback()) { + if (!$loginCb->waitCallback()) { die(errorMsgBlock(3003)); } //the rest of the process is done in the callback function