From 9da3a71d9d2e762a6776fc4496337629fee178a9 Mon Sep 17 00:00:00 2001 From: Stanislas Dolcini Date: Tue, 2 Oct 2018 22:45:57 +0200 Subject: [PATCH] Set boolean to false by default --- code/web/public_php/login/r2_login.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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);