Switch printed order of firstname and lastname (#758)
When separating with a comma, put the lastname up front. Signed-off-by: Stefan Schake <stefan.schake@devolo.de>
This commit is contained in:
committed by
Stefan Behl
parent
ddca072561
commit
49d064df18
@@ -123,13 +123,13 @@ public final class UserDetailsFormatter {
|
|||||||
|
|
||||||
final UserPrincipal userPrincipal = (UserPrincipal) userDetails;
|
final UserPrincipal userPrincipal = (UserPrincipal) userDetails;
|
||||||
|
|
||||||
String firstname = StringUtils.defaultIfEmpty(userPrincipal.getFirstname(), "");
|
String lastname = StringUtils.defaultIfEmpty(userPrincipal.getLastname(), "");
|
||||||
|
|
||||||
if (!StringUtils.isEmpty(firstname)) {
|
if (!StringUtils.isEmpty(lastname)) {
|
||||||
firstname += DETAIL_SEPERATOR;
|
lastname += DETAIL_SEPERATOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
final String firstAndLastname = firstname + StringUtils.defaultIfEmpty(userPrincipal.getLastname(), "");
|
final String firstAndLastname = lastname + StringUtils.defaultIfEmpty(userPrincipal.getFirstname(), "");
|
||||||
|
|
||||||
final String trimmedUsername = trimAndFormatDetail(firstAndLastname, expectedNameLength);
|
final String trimmedUsername = trimAndFormatDetail(firstAndLastname, expectedNameLength);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user