Skip to content

Commit

Permalink
Merge pull request #1445 from axonivy-market/feature/IVYPORTAL-18316-…
Browse files Browse the repository at this point in the history
…Update-the-Avatar-component-to-auto-convert-email-to-lower-cases-10

IVYPORTAL-18316 Update the Avatar component to auto convert email to lower cases 10
  • Loading branch information
mnhnam-axonivy authored Jan 15, 2025
2 parents 25df3d9 + c33c1a4 commit e0b029b
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,17 @@ public String getEmailAddress(SecurityMemberDTO securityMember) {
return securityMember.getEMailAddress();
}

public String getEmailAddress(UserDTO user) {
public String getEmailAddress(UserDTO user, boolean useLowercaseEmail) {
if (user == null) {
return "";
}
return user.getEmail();
String email = user.getEmail();
return BooleanUtils.isTrue(useLowercaseEmail)
? Optional.ofNullable(email).map(String::toLowerCase).orElse(email)
: email;
}

public String getEmailAddress(RoleDTO role) {
public String getEmailAddress(RoleDTO role, boolean useLowercaseEmail) {
return "";
}

Expand Down

0 comments on commit e0b029b

Please sign in to comment.