protected LdapUserEntity transformUser(SearchResult result) throws NamingException {
   final Attributes attributes = result.getAttributes();
   LdapUserEntity user = new LdapUserEntity();
   user.setDn(result.getNameInNamespace());
   user.setId(getStringAttributeValue(ldapConfiguration.getUserIdAttribute(), attributes));
   user.setFirstName(
       getStringAttributeValue(ldapConfiguration.getUserFirstnameAttribute(), attributes));
   user.setLastName(
       getStringAttributeValue(ldapConfiguration.getUserLastnameAttribute(), attributes));
   user.setEmail(getStringAttributeValue(ldapConfiguration.getUserEmailAttribute(), attributes));
   return user;
 }