apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/ldap/LdapUserService.java/LdapUserService/searchUserById
class LdapUserService:  private UserInfo searchUserById(String userId) {
    try {
      return ldapTemplate.searchForObject(query().where(loginIdAttrName).is(userId),
          ctx -> {
            UserInfo userInfo = new UserInfo();
            DirContextAdapter contextAdapter = (DirContextAdapter) ctx;
            userInfo.setEmail(contextAdapter.getStringAttribute(emailAttrName));
            userInfo.setName(contextAdapter.getStringAttribute(userDisplayNameAttrName));
            userInfo.setUserId(contextAdapter.getStringAttribute(loginIdAttrName));
            return userInfo;
          });
    } catch (EmptyResultDataAccessException ex) {
      // EmptyResultDataAccessException means no record found
      return null;
    }
  }