I would like the default search to also search for the keyword in the user__name field.
I looked at the code a lot but I couldn't modify it correctly. I managed to save an advanced search which does the search correctly (User / Full Name), but here the search term is fixed.
Can you help me?
Thanks

    Thanks, the code

    else {
                     //$criteria = [':keywords', 'null', $_GET['query']];
                     $criteria = ['user__name', 'contains', $_GET['query']];
                 }

    I would like it to also search with the previous :keywords criteria.
    How can I combine the two criteria?

                    $criteria = [
                        [':keywords', 'null', $_GET['query']],
                        ['user__name', 'contains', $_GET['query']],
                    ];
                }
                $_SESSION['advsearch'][$key] = $criteria;

    Work, but It does a search with AND logic, I would like it to display the results of both filters

      rollopack

      Then you would have to modify the code deeper. We cannot assist with modifications so you are on your own. I gave you a good start so follow the pipeline and modify the code to your liking.

      Cheers.

      8 days later

      I have solved with:

                      $criteria = [
                          ['user__name', 'contains', $_GET['query']],
                          ['cdata__subject', 'contains', $_GET['query']],

      And in class.orm.php

              if ($where) {
                  /* Use OR for Ticket search */
                  if ($model === "Ticket" && $where[0] == "A2.`name` LIKE :1") {
                      $where = ' WHERE ' . implode(' OR ', $where);
                  } else {
                      $where = ' WHERE ' . implode(' AND ', $where);
                  }
              }
      Write a Reply...