Skip to content
Snippets Groups Projects
Commit 27289f15 authored by Brian Major's avatar Brian Major
Browse files

ac2 - user details applied on both user trees

parent 340bcb14
No related branches found
No related tags found
No related merge requests found
......@@ -136,28 +136,29 @@ public class GetUserAction extends AbstractUserAction
try
{
user = userPersistence.getUser(principal);
// Only return user profile info, first and last name.
if (detail != null && detail.equalsIgnoreCase("display"))
{
user.getIdentities().clear();
Set<PersonalDetails> details = user.getDetails(PersonalDetails.class);
if (details.isEmpty())
{
String error = principal.getName() + " missing required PersonalDetails";
throw new IllegalStateException(error);
}
PersonalDetails pd = details.iterator().next();
user.details.clear();
user.details.add(new PersonalDetails(pd.getFirstName(), pd.getLastName()));
}
}
catch (UserNotFoundException e)
{
user = userPersistence.getPendingUser(principal);
}
// Only return user profile info, first and last name.
if (detail != null && detail.equalsIgnoreCase("display"))
{
user.getIdentities().clear();
Set<PersonalDetails> details = user.getDetails(PersonalDetails.class);
if (details.isEmpty())
{
String error = principal.getName() + " missing required PersonalDetails";
throw new IllegalStateException(error);
}
PersonalDetails pd = details.iterator().next();
user.details.clear();
user.details.add(new PersonalDetails(pd.getFirstName(), pd.getLastName()));
}
}
return user;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment