diff --git a/source/java/org/alfresco/repo/jscript/app/UsernamePropertyDecorator.java b/source/java/org/alfresco/repo/jscript/app/UsernamePropertyDecorator.java index 2ec41a1aa4..9692ec3ab0 100644 --- a/source/java/org/alfresco/repo/jscript/app/UsernamePropertyDecorator.java +++ b/source/java/org/alfresco/repo/jscript/app/UsernamePropertyDecorator.java @@ -57,9 +57,12 @@ public class UsernamePropertyDecorator extends BasePropertyDecorator JSONObject map = new JSONObject(); map.put("userName", username); - NodeRef personRef = this.personService.getPersonOrNull(username); - if (personRef != null) + // DO NOT change this to just use getPersonOrNullImpl + // - there is Cloud THOR prod hack see personServiceImpl.personExists + // - and THOR-293 + if (this.personService.personExists(username)) { + NodeRef personRef = this.personService.getPerson(username, false); firstName = (String)this.nodeService.getProperty(personRef, ContentModel.PROP_FIRSTNAME); lastName = (String)this.nodeService.getProperty(personRef, ContentModel.PROP_LASTNAME); }