Add return type declarations and minor bug fixes

This commit is contained in:
2023-01-21 12:14:24 +01:00
parent 0d382462f2
commit c81ef18f5f
11 changed files with 99 additions and 72 deletions

View File

@ -24,7 +24,7 @@ if($_SERVER['REQUEST_METHOD']==='POST'){
$stmt=$db->prepare('INSERT INTO pass_change (user_id, password) VALUES (?, ?);');
$hash=get_system_hash($_POST['newpass']);
$stmt->execute([$user['id'], $hash]);
$msg.='<p style="color:green;">Successfully changed system account password, change will take affect within the next minute.</p>';
$msg.='<p style="color:green;">Successfully changed system account password, change will take effect within the next minute.</p>';
}elseif($_REQUEST['type']==='sql'){
$stmt=$db->prepare("SET PASSWORD FOR '$user[mysql_user]'@'%'=PASSWORD(?);");
$stmt->execute([$_POST['newpass']]);