Skip to content

Commit

Permalink
APIM-7554 fix: enable user search with case-insensitive email address
Browse files Browse the repository at this point in the history
  • Loading branch information
vikrantgravitee committed Dec 2, 2024
1 parent 08e2bd0 commit 7882cbc
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ public Document transform(UserEntity user) {
logger.warn("Email of the user {} is not valid", user.getId());
} else {
// For security reasons, we remove the domain part of the email
doc.add(new StringField(FIELD_EMAIL, user.getEmail().substring(0, user.getEmail().indexOf('@')), Field.Store.NO));
doc.add(
new StringField(FIELD_EMAIL, user.getEmail().substring(0, user.getEmail().indexOf('@')).toLowerCase(), Field.Store.NO)
);
}
}

Expand Down

0 comments on commit 7882cbc

Please sign in to comment.