Skip to content
Permalink
Browse files
FC-292 - User displayName attribute not updated
  • Loading branch information
shawnmckinney committed May 10, 2021
1 parent 2d645c8 commit 07fe2f9665d36d703dbcb7f691c1fc3dd395c159
Showing 1 changed file with 8 additions and 2 deletions.
@@ -272,8 +272,8 @@ else if( !Config.getInstance().getBoolean( GlobalIds.USER_CREATION_PASSWORD_FIEL
{
myEntry.add( SchemaConstants.USER_PASSWORD_AT, new String() );
}
myEntry.add( SchemaConstants.DISPLAY_NAME_AT, entity.getCn() );

myEntry.add( SchemaConstants.DISPLAY_NAME_AT, StringUtils.isNotEmpty( entity.getDisplayName() ) ? entity.getDisplayName() : entity.getCn() );

if ( StringUtils.isNotEmpty( entity.getTitle() ) )
{
@@ -420,6 +420,11 @@ User update( User entity ) throws UpdateException
.getEmployeeType() ) );
}

if ( StringUtils.isNotEmpty( entity.getDisplayName() ) )
{
mods.add( new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, SchemaConstants.DISPLAY_NAME_AT, entity.getDisplayName() ) );
}

if ( StringUtils.isNotEmpty( entity.getTitle() ) )
{
mods.add( new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, SchemaConstants.TITLE_AT,
@@ -2176,6 +2181,7 @@ private User unloadLdapEntry( Entry entry, long sequence, String contextId )
entity.setSn( getAttribute( entry, SchemaConstants.SN_AT ) );
entity.setOu( getAttribute( entry, SchemaConstants.OU_AT ) );
entity.setDn( entry.getDn().getName() );
entity.setDisplayName( getAttribute( entry, SchemaConstants.DISPLAY_NAME_AT ) );
entity.setTitle( getAttribute( entry, SchemaConstants.TITLE_AT ) );
entity.setEmployeeType( getAttribute( entry, EMPLOYEE_TYPE ) );
unloadTemporal( entry, entity );

0 comments on commit 07fe2f9

Please sign in to comment.