mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -57,9 +57,9 @@ public class UsernamePropertyDecorator extends BasePropertyDecorator
|
|||||||
JSONObject map = new JSONObject();
|
JSONObject map = new JSONObject();
|
||||||
map.put("userName", username);
|
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);
|
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);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user