From 6143a2c504a6bdea8a5a983d6ac94bc0ed26fbc4 Mon Sep 17 00:00:00 2001 From: James Gunn Date: Wed, 2 Oct 2024 12:53:24 +0100 Subject: [PATCH] Disable duplicate check on user import --- .../Services/UserImport/UserImportProcessor.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dotnet-authserver/src/TeacherIdentity.AuthServer/Services/UserImport/UserImportProcessor.cs b/dotnet-authserver/src/TeacherIdentity.AuthServer/Services/UserImport/UserImportProcessor.cs index 084afc8b5..da2c6a34d 100644 --- a/dotnet-authserver/src/TeacherIdentity.AuthServer/Services/UserImport/UserImportProcessor.cs +++ b/dotnet-authserver/src/TeacherIdentity.AuthServer/Services/UserImport/UserImportProcessor.cs @@ -243,14 +243,14 @@ public async Task Process(Guid userImportJobId) var dateOfBirth = DateOnly.ParseExact(row!.DateOfBirth!, "ddMMyyyy", CultureInfo.InvariantCulture); // Validate for potential duplicates - var existingUsers = await _userSearchService.FindUsers(firstName, lastName, dateOfBirth); - if (existingUsers.Any(u => u.EmailAddress != row.EmailAddress!)) - { - errors.Add("Potential duplicate user"); - userImportJobRow.Notes = errors; - userImportJobRow.UserImportRowResult = UserImportRowResult.Invalid; - } - else + //var existingUsers = await _userSearchService.FindUsers(firstName, lastName, dateOfBirth); + //if (existingUsers.Any(u => u.EmailAddress != row.EmailAddress!)) + //{ + // errors.Add("Potential duplicate user"); + // userImportJobRow.Notes = errors; + // userImportJobRow.UserImportRowResult = UserImportRowResult.Invalid; + //} + //else { user = new User {