Style fix
This commit is contained in:
parent
6aca9390fa
commit
d57aa9a09c
1 changed files with 7 additions and 9 deletions
|
@ -70,36 +70,34 @@ class ConnectionHandler
|
||||||
|
|
||||||
private function Login($login, $password, $clientApplication, $cp, $submittedLang)
|
private function Login($login, $password, $clientApplication, $cp, $submittedLang)
|
||||||
{
|
{
|
||||||
$res = false;
|
|
||||||
$domainId = -1;
|
$domainId = -1;
|
||||||
// Client sent his login info
|
// Client sent his login info
|
||||||
if (checkUserValidity($login, $password, $clientApplication, $cp, $id, $reason, $priv, $extended, $domainId, $submittedLang)) {
|
if (checkUserValidity($login, $password, $clientApplication, $cp, $id, $reason, $priv, $extended, $domainId, $submittedLang)) {
|
||||||
echo '0:' . $reason;
|
echo '0:' . $reason;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// retrieve the domain info
|
// retrieve the domain info
|
||||||
$domainInfo = getDomainInfo($domainId);
|
$domainInfo = getDomainInfo($domainId);
|
||||||
|
|
||||||
// if we need to create missing ring info
|
// if we need to create missing ring info
|
||||||
if ($AutoCreateRingInfo) {
|
if ($AutoCreateRingInfo) {
|
||||||
CreateRing($domainInfo);
|
CreateRing($domainInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
// store the web host for this domain
|
// store the web host for this domain
|
||||||
global $RingWebHost, $RingWebHostPHP;
|
global $RingWebHost;
|
||||||
|
global $RingWebHostPHP;
|
||||||
|
|
||||||
$RingWebHost = $domainInfo['web_host'];
|
$RingWebHost = $domainInfo['web_host'];
|
||||||
$RingWebHostPHP = $domainInfo['web_host_php'];
|
$RingWebHostPHP = $domainInfo['web_host_php'];
|
||||||
|
|
||||||
$LSaddr = explode(":", $domainInfo['login_address']);
|
$LSaddr = explode(":", $domainInfo['login_address']);
|
||||||
|
|
||||||
// ask for a session cookie to the login service
|
// ask for a session cookie to the login service
|
||||||
$login = new LoginCb;
|
$loginCb = new LoginCb();
|
||||||
$res = "";
|
$loginCb->connect($LSaddr[0], $LSaddr[1], '');
|
||||||
$login->connect($LSaddr[0], $LSaddr[1], $res);
|
$loginCb->login($id, $_SERVER['REMOTE_ADDR'], $domainId);
|
||||||
$login->login($id, $_SERVER["REMOTE_ADDR"], $domainId);
|
|
||||||
|
|
||||||
// wait for the return message
|
// wait for the return message
|
||||||
if (!$login->waitCallback()) {
|
if (!$loginCb->waitCallback()) {
|
||||||
die(errorMsgBlock(3003));
|
die(errorMsgBlock(3003));
|
||||||
}
|
}
|
||||||
//the rest of the process is done in the callback function
|
//the rest of the process is done in the callback function
|
||||||
|
|
Loading…
Reference in a new issue