apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/ldap/LdapUserService.java/LdapUserService/findByUserId
class LdapUserService:  @Override
  public UserInfo findByUserId(String userId) {
    if (StringUtils.isNotBlank(groupSearch)) {
      List<UserInfo> lists = searchUserInfoByGroup(groupBase, groupSearch, null,
          Collections.singletonList(userId));
      if (lists != null && !lists.isEmpty() && lists.get(0) != null) {
        return lists.get(0);
      }
      return null;
    }

    try {
      return ldapTemplate
          .searchForObject(ldapQueryCriteria().and(loginIdAttrName).is(userId), ldapUserInfoMapper);
    } catch (EmptyResultDataAccessException ex) {
      // EmptyResultDataAccessException means no record found
      return null;
    }
  }