From c9b4f63a3f19aebacfdb4f77c42880632dfdadf0 Mon Sep 17 00:00:00 2001 From: Kevin Roast Date: Tue, 6 May 2014 10:45:59 +0000 Subject: [PATCH] Fix for MNT-11408 - change to use the only 'safe' Thor only codepath to avoid early THOR data hack from THOR-293 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@69652 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../repo/jscript/app/UsernamePropertyDecorator.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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); }