DEV: Bulk imports should find existing users by email (#14468)

Without this change, bulk imports unconditionally create new user records even when a user with the same email address exists.
This commit is contained in:
Gerhard Schlager
2021-09-29 00:20:06 +02:00
committed by GitHub
parent 574cb28b0e
commit a4d0d866aa
3 changed files with 30 additions and 9 deletions
+1
View File
@@ -83,6 +83,7 @@ class BulkImport::PhpBB < BulkImport::Base
u = {
imported_id: row["user_id"],
username: normalize_text(row["username"]),
email: row["user_email"],
created_at: Time.zone.at(row["user_regdate"].to_i),
last_seen_at: row["user_lastvisit"] == 0 ? Time.zone.at(row["user_regdate"].to_i) : Time.zone.at(row["user_lastvisit"].to_i),
trust_level: row["user_posts"] == 0 ? TrustLevel[0] : TrustLevel[1],