code: protected void addSearchFilterCondition(
          CmsSelectQuery select,
          TableAlias users,
          CmsUserSearchParameters searchParams) {
  
          String searchFilter = searchParams.getSearchFilter();
          if (!CmsStringUtil.isEmptyOrWhitespaceOnly(searchFilter)) {
              boolean caseInsensitive = !searchParams.isCaseSensitive();
              if (caseInsensitive) {
                  searchFilter = searchFilter.toLowerCase();
              }
              CmsCompositeQueryFragment searchCondition = new CmsCompositeQueryFragment();
              searchCondition.setSeparator(" OR ");
              searchCondition.setPrefix("(");
              searchCondition.setSuffix(")");
              //use coalesce in case any of the name columns are null
              String patternExprTemplate = generateConcat(
                  "COALESCE(%1$s, '')",
                  "' '",
                  "COALESCE(%2$s, '')",
                  "' '",
                  "COALESCE(%3$s, '')");
              patternExprTemplate = wrapLower(patternExprTemplate, caseInsensitive);
  
              String patternExpr = String.format(
                  patternExprTemplate,
                  users.column(colName()),
                  users.column(colFirstName()),
                  users.column(colLastName()));
              String like = " LIKE ? ESCAPE '!' ";
              String matchExpr = patternExpr + like;
              searchFilter = "%" + CmsEncoder.escapeSqlLikePattern(searchFilter, '!') + '%';
              searchCondition.add(new CmsSimpleQueryFragment(matchExpr, searchFilter));
              for (SearchKey key : searchParams.getSearchKeys()) {
                  switch (key) {
                      case email:
                          searchCondition.add(
                              new CmsSimpleQueryFragment(
                                  wrapLower(users.column(colEmail()), caseInsensitive) + like,
                                  searchFilter));
                          break;
                      case orgUnit:
                          searchCondition.add(new CmsSimpleQueryFragment(
                              wrapLower(users.column(colOu()), caseInsensitive) + like,
                              searchFilter));
                          break;
                      default:
                          break;
                  }
              }
              select.addCondition(searchCondition);
          }
      }
docs: Adds a search condition to a query.<p>
  
  @param select the query
  @param users the user table alias
  @param searchParams the search criteria