Bulk User Import Creates Duplicate Accounts for Email Case Variants
Level 1 · node · Correctness · Missing identifier normalization
Scenario
An admin bulk-user import passes rows parsed from CSV to a service that stores only entries not already present. An exactly matching email is skipped, but when an existing account is [email protected], [email protected] is reported as a newly created account. The repository normalizes emails to lowercase when storing them, while duplicate checking is performed by the service flow.
Requirements
- Compare email identifiers case-insensitively - Skip an email that matches an existing account even when letter case differs - Within one import batch, case-only variants of the same email create at most one account - New email addresses are stored normally - created and skipped counts match the actual processing result
Acceptance criteria
- One new email is stored and counted as created
- An exact existing email is counted as skipped
- A case-only variant of an existing email is also skipped
- Case variants within one batch do not create duplicate accounts
- created and skipped counts are correct for a mixed batch