Skip to content

Commit

Permalink
IVYPORTAL-18316: Update the Avatar component to auto convert email to…
Browse files Browse the repository at this point in the history
… lower cases

- Fixed error after add new attribute
  • Loading branch information
mnhnam-axonivy committed Jan 15, 2025
1 parent 6cdf386 commit c33c1a4
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 c33c1a4

Please sign in to comment.