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 $AcceptUnknownUser;
|
||||
setMsgLanguage($lang);
|
||||
$res = false;
|
||||
|
||||
$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));
|
||||
|
@ -250,13 +251,10 @@ function checkUserValidity($login, $password, $clientApplication, $cp, &$id, &$r
|
|||
// set an additionnal privilege for this player
|
||||
$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)));
|
||||
|
||||
$reason = errorMsg(3012, $accessPriv);
|
||||
$res = false;
|
||||
} else {
|
||||
// no permission
|
||||
$reason = errorMsg(3013, $clientApplication, $domainName, $accessPriv);
|
||||
$res = false;
|
||||
}
|
||||
} else {
|
||||
// // check if the user not already online
|
||||
|
@ -285,7 +283,6 @@ function checkUserValidity($login, $password, $clientApplication, $cp, &$id, &$r
|
|||
}
|
||||
} else {
|
||||
$reason = errorMsg(2004, 'user');
|
||||
$res = false;
|
||||
}
|
||||
}
|
||||
mysqli_close($link);
|
||||
|
|
Loading…
Reference in a new issue