Set boolean to false by default
This commit is contained in:
parent
c833d2131e
commit
9da3a71d9d
1 changed files with 1 additions and 4 deletions
|
@ -154,6 +154,7 @@ function checkUserValidity($login, $password, $clientApplication, $cp, &$id, &$r
|
||||||
global $DBName;
|
global $DBName;
|
||||||
global $AcceptUnknownUser;
|
global $AcceptUnknownUser;
|
||||||
setMsgLanguage($lang);
|
setMsgLanguage($lang);
|
||||||
|
$res = false;
|
||||||
|
|
||||||
$link = mysqli_connect($DBHost, $DBUserName, $DBPassword) or die(errorMsgBlock(3004, 'main', $DBHost, $DBUserName));
|
$link = mysqli_connect($DBHost, $DBUserName, $DBPassword) or die(errorMsgBlock(3004, 'main', $DBHost, $DBUserName));
|
||||||
mysqli_select_db($link, $DBName) or die(errorMsgBlock(3005, 'main', $DBName, $DBHost, $DBUserName));
|
mysqli_select_db($link, $DBName) or die(errorMsgBlock(3005, 'main', $DBName, $DBHost, $DBUserName));
|
||||||
|
@ -250,13 +251,10 @@ function checkUserValidity($login, $password, $clientApplication, $cp, &$id, &$r
|
||||||
// set an additionnal privilege for this player
|
// set an additionnal privilege for this player
|
||||||
$query = "UPDATE permission set AccessPrivilege='" . $permission['AccessPrivilege'] . ",$accessPriv' WHERE PermissionId=" . $permission['PermissionId'];
|
$query = "UPDATE permission set AccessPrivilege='" . $permission['AccessPrivilege'] . ",$accessPriv' WHERE PermissionId=" . $permission['PermissionId'];
|
||||||
$result = mysqli_query($link, $query) or die(errorMsgBlock(3006, $query, 'main', $DBName, $DBHost, $DBUserName, mysqli_error($link)));
|
$result = mysqli_query($link, $query) or die(errorMsgBlock(3006, $query, 'main', $DBName, $DBHost, $DBUserName, mysqli_error($link)));
|
||||||
|
|
||||||
$reason = errorMsg(3012, $accessPriv);
|
$reason = errorMsg(3012, $accessPriv);
|
||||||
$res = false;
|
|
||||||
} else {
|
} else {
|
||||||
// no permission
|
// no permission
|
||||||
$reason = errorMsg(3013, $clientApplication, $domainName, $accessPriv);
|
$reason = errorMsg(3013, $clientApplication, $domainName, $accessPriv);
|
||||||
$res = false;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// // check if the user not already online
|
// // check if the user not already online
|
||||||
|
@ -285,7 +283,6 @@ function checkUserValidity($login, $password, $clientApplication, $cp, &$id, &$r
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$reason = errorMsg(2004, 'user');
|
$reason = errorMsg(2004, 'user');
|
||||||
$res = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mysqli_close($link);
|
mysqli_close($link);
|
||||||
|
|
Loading…
Reference in a new issue