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
This commit is contained in:
Kevin Roast
2014-05-06 10:45:59 +00:00
parent a9b232b235
commit c9b4f63a3f

View File

@@ -57,9 +57,12 @@ public class UsernamePropertyDecorator extends BasePropertyDecorator
JSONObject map = new JSONObject(); JSONObject map = new JSONObject();
map.put("userName", username); map.put("userName", username);
NodeRef personRef = this.personService.getPersonOrNull(username); // DO NOT change this to just use getPersonOrNullImpl
if (personRef != null) // - 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); firstName = (String)this.nodeService.getProperty(personRef, ContentModel.PROP_FIRSTNAME);
lastName = (String)this.nodeService.getProperty(personRef, ContentModel.PROP_LASTNAME); lastName = (String)this.nodeService.getProperty(personRef, ContentModel.PROP_LASTNAME);
} }