diff --git a/src/sync_paheko.rs b/src/sync_paheko.rs index 0f8b292..db52250 100644 --- a/src/sync_paheko.rs +++ b/src/sync_paheko.rs @@ -118,7 +118,11 @@ pub async fn sync_paheko( // check for existing user in paheko by email // TODO: check user with fuzzing first name and last name let existing_user_opt = existing_users - .iter().find(|user| user.first_name == answer.first_name && user.last_name == answer.last_name) + .iter() + .find(|user| + user.first_name.clone().map(|x| x.to_lowercase()) == answer.first_name.clone().map(|x| x.to_lowercase()) && + user.last_name.to_lowercase() == answer.last_name.to_lowercase() + ) .cloned(); let pk_user_summary = match existing_user_opt.clone() { Some(user) => {