Skip to content

Commit

Permalink
#17957 - fix import by foreign key overwriting existing records
Browse files Browse the repository at this point in the history
  • Loading branch information
michield committed Dec 2, 2015
1 parent 7428a40 commit 3349aff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public_html/lists/admin/actions/import2.php
Expand Up @@ -209,7 +209,7 @@
# check whether the email will clash
$clashcheck = Sql_Fetch_Array_Query(sprintf('select id,foreignkey,uniqid from %s
where email = "%s"', $tables['user'], $user['systemvalues']['email']));
if ($clashcheck['id'] != $existing_user['id']) {
if (!empty($clashcheck['id']) && $clashcheck['id'] != $existing_user['id']) {
#https://mantis.phplist.org/view.php?id=17752
# if the existing record does not have an FK, we treat it as an update, matched on email
if (empty($clashcheck['foreignkey'])) {
Expand Down

0 comments on commit 3349aff

Please sign in to comment.