Skip to content

Commit

Permalink
fix: allow delete from addr book when username is null (openemr#7806)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenwaite authored Nov 15, 2024
1 parent 94a5988 commit e8354b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion interface/usergroup/addrbook_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ function typeSelect(a) {
} elseif (!empty($_POST['form_delete'])) {
if ($userid) {
// Be careful not to delete internal users.
sqlStatement("DELETE FROM users WHERE id = ? AND username = ''", array($userid));
sqlStatement("DELETE FROM users WHERE id = ? AND (username = '' OR username IS NULL)", array($userid));
}
}

Expand Down

0 comments on commit e8354b3

Please sign in to comment.