Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)

66650: Merged WAT2 (4.3/Cloud) to HEAD-BUG-FIX (4.3/Cloud)
      65775: Performance improvement to UsernamePropertyDecorator - avoid pointless person.exists() test and use getPersonOrNull instead.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@66727 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Will Abson
2014-04-03 16:26:47 +00:00
parent 1ba34f2b11
commit 28060c9cdf

View File

@@ -57,9 +57,9 @@ public class UsernamePropertyDecorator extends BasePropertyDecorator
JSONObject map = new JSONObject();
map.put("userName", username);
if (this.personService.personExists(username))
NodeRef personRef = this.personService.getPersonOrNull(username);
if (personRef != null)
{
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);
}