Dn userName = new Dn( "uid=" + uid + ",ou=users,ou=system" );
// compare the telephone numbers
LdapConnection userConnection = getConnectionAs( userName, password );
// modify the entry as the user
ModifyRequest modReq = new ModifyRequestImpl();
modReq.setName( entryDn );
for ( Modification modification : mods )
{
modReq.addModification( modification );
}
ModifyResponse resp = userConnection.modify( modReq );
if ( resp.getLdapResult().getResultCode() == ResultCodeEnum.SUCCESS )