Do not reuse parameters variable names, just don't
This commit is contained in:
parent
9da3a71d9d
commit
b72c53f68f
1 changed files with 2 additions and 2 deletions
|
@ -190,8 +190,8 @@ function checkUserValidity($login, $password, $clientApplication, $cp, &$id, &$r
|
||||||
if (mysqli_num_rows($result) == 0) {
|
if (mysqli_num_rows($result) == 0) {
|
||||||
if ($AcceptUnknownUser) {
|
if ($AcceptUnknownUser) {
|
||||||
// login doesn't exist, create it
|
// login doesn't exist, create it
|
||||||
$password = mysqli_real_escape_string($link, $password);
|
$escaped_password = $mysqli->escape_string($password);
|
||||||
$query = "INSERT INTO user (Login, Password) VALUES ('$login', '$password')";
|
$query = "INSERT INTO user (Login, Password) VALUES ('$login', '$escaped_password')";
|
||||||
$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)));
|
||||||
|
|
||||||
// get the user to have his UId
|
// get the user to have his UId
|
||||||
|
|
Loading…
Reference in a new issue