Add checks for email subject and body before sending (#7881)

This commit is contained in:
Alex
2026-04-17 16:13:49 +00:00
committed by GitHub
parent 4d5d099169
commit 163cb0b372
2 changed files with 12 additions and 8 deletions
+2
View File
@@ -592,11 +592,13 @@
}
unset($sql, $parameters, $row);
if (!empty($email_subject) && !empty($email_body)) {
//replace variables in email body
$email_body = str_replace('${domain}', $domain_name, $email_body);
//send the email
send_email($user_email, $email_subject, $email_body, $eml_error);
}
//build the user log array
$log_array['type'] = 'Password Changed';
+2
View File
@@ -456,11 +456,13 @@
}
unset($sql, $parameters, $row);
if (!empty($email_subject) && !empty($email_body)) {
//replace variables in email body
$email_body = str_replace('${domain}', $domain_name, $email_body);
//send the email
send_email($user_email, $email_subject, $email_body, $eml_error);
}
//get the username
$sql = "select username from v_users ";