Prevent users setting/hashing an empty password

This commit is contained in:
Marcus Hill
2024-01-19 23:45:02 +00:00
parent ee68bf10b8
commit 1fcf559e13
2 changed files with 7 additions and 2 deletions

View File

@@ -92,6 +92,11 @@ if (isset($_POST['edit_your_user_password'])) {
$new_password = trim($_POST['new_password']);
if (empty($new_password)) {
header('Location: user_security.php');
exit;
}
// Email notification when password or email is changed
$user_sql = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT user_name, user_email FROM users WHERE user_id = $session_user_id"));
$name = sanitizeInput($user_sql['user_name']);