diff --git a/code/web/public_php/login/r2_login.php b/code/web/public_php/login/r2_login.php index c0f77b527..854c4feab 100755 --- a/code/web/public_php/login/r2_login.php +++ b/code/web/public_php/login/r2_login.php @@ -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);