Skip to content
Snippets Groups Projects
Commit 6f0ee4f8 authored by Alexandre Eberhardt's avatar Alexandre Eberhardt
Browse files

Display name: return "" if first or last name is not set in LDAP/AD

Change the return API to avoid displaying "null" as name in every client
Usefull when first and/or last name is left blank during LDAP/AD creation

GitLab: #145
Change-Id: I48270ad514d6ffaa33c58678354b2fc146d5d18f
parent 942e9f6b
No related branches found
No related tags found
No related merge requests found
......@@ -85,7 +85,11 @@ public class RegisterDeviceFlow {
user.getEthAddress());
response.setDeviceReceipt(devReceipt[0]);
response.setReceiptSignature(devReceipt[1]);
response.setDisplayName(userProfile.getFirstName() + " " + userProfile.getLastName());
String firstDisplayName =
userProfile.getFirstName() != null ? userProfile.getFirstName() : "";
String lastDisplayName =
userProfile.getLastName() != null ? userProfile.getLastName() : "";
response.setDisplayName(firstDisplayName + " " + lastDisplayName);
response.setNameServer(nameServer.getURI());
if (userProfile.getProfilePicture() != null)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment