Skip to content

Commit

Permalink
Merge pull request #177 from catalyst/email-suffix
Browse files Browse the repository at this point in the history
Make email suffix cleaner idempotent #176
  • Loading branch information
brendanheywood authored May 13, 2024
2 parents 05ef221 + d392456 commit 0b89660
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cleaner/email/classes/clean.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,10 @@ public static function execute_appendsuffix($config, $verbose, $dryrun) {
}

$query = "UPDATE {user} SET email = " . $DB->sql_concat_join("''", ['email', "'$suffix'"]);
$query .= " WHERE email " . $DB->sql_regex(false) . " '$suffix'";

if (!empty($emailsuffixignore)) {
$query .= " WHERE email " . $DB->sql_regex(false) . " '$emailsuffixignore'";
$query .= " AND email " . $DB->sql_regex(false) . " '$emailsuffixignore'";
}

if ($verbose) {
Expand Down

0 comments on commit 0b89660

Please sign in to comment.