phpstan level 1 errors reduction
This commit is contained in:
@@ -75,11 +75,8 @@ function array_keys_exist(array $array, $keys)
|
||||
function updateUserPassword($db, $userId, $password)
|
||||
{
|
||||
// we don't save the actual password but it's hash
|
||||
if ($password != "") {
|
||||
$password = password_hash($password, PASSWORD_DEFAULT);
|
||||
} else {
|
||||
$password = null;
|
||||
}
|
||||
$password =
|
||||
$password != "" ? password_hash($password, PASSWORD_DEFAULT) : null;
|
||||
|
||||
$query =
|
||||
"UPDATE `cwsvjudo_main`.`wkParticipo_Users` SET `pwHash`=:val WHERE `id`=:id;";
|
||||
@@ -114,7 +111,7 @@ function changePassword(
|
||||
return false;
|
||||
}
|
||||
|
||||
$changerInfo = getUserData($db, $changerId);
|
||||
$changerInfo = getUserData($changerId);
|
||||
|
||||
// check the password of the changer
|
||||
if (!password_verify($changerPassword, $changerInfo["pwHash"])) {
|
||||
|
||||
Reference in New Issue
Block a user