original_string: public function search_other_users($search = '', $searchanywhere = false, $page = 0, $perpage = 25, $returnexactcount = false) {
          global $DB, $CFG;
  
          list($ufields, $params, $wherecondition) = $this->get_basic_search_conditions($search, $searchanywhere);
  
          $fields      = 'SELECT ' . $ufields;
          $countfields = 'SELECT COUNT(u.id)';
          $sql   = " FROM {user} u
                LEFT JOIN {role_assignments} ra ON (ra.userid = u.id AND ra.contextid = :contextid)
                    WHERE $wherecondition
                      AND ra.id IS NULL";
          $params['contextid'] = $this->context->id;
  
          return $this->execute_search_queries($search, $fields, $countfields, $sql, $params, $page, $perpage, 0, $returnexactcount);
      }
code: public function search_other_users($search = '', $searchanywhere = false, $page = 0, $perpage = 25, $returnexactcount = false) {
          global $DB, $CFG;
  
          list($ufields, $params, $wherecondition) = $this->get_basic_search_conditions($search, $searchanywhere);
  
          $fields      = 'SELECT ' . $ufields;
          $countfields = 'SELECT COUNT(u.id)';
          $sql   = " FROM {user} u
                LEFT JOIN {role_assignments} ra ON (ra.userid = u.id AND ra.contextid = :contextid)
                    WHERE $wherecondition
                      AND ra.id IS NULL";
          $params['contextid'] = $this->context->id;
  
          return $this->execute_search_queries($search, $fields, $countfields, $sql, $params, $page, $perpage, 0, $returnexactcount);
      }
code_tokens: public function search_other_users ( $ search = '' , $ searchanywhere = false , $ page = 0 , $ perpage = 25 , $ returnexactcount = false ) { global $ DB , $ CFG ; list ( $ ufields , $ params , $ wherecondition ) = $ this -> get_basic_search_conditions ( $ search , $ searchanywhere ) ; $ fields = 'SELECT ' . $ ufields ; $ countfields = 'SELECT COUNT(u.id)' ; $ sql = " FROM {user} u
                LEFT JOIN {role_assignments} ra ON (ra.userid = u.id AND ra.contextid = :contextid)
                    WHERE $wherecondition
                      AND ra.id IS NULL" ; $ params [ 'contextid' ] = $ this -> context -> id ; return $ this -> execute_search_queries ( $ search , $ fields , $ countfields , $ sql , $ params , $ page , $ perpage , 0 , $ returnexactcount ) ; }
docstring: Searches other users and returns paginated results
  
  @global moodle_database $DB
  @param string $search
  @param bool $searchanywhere
  @param int $page Starting at 0
  @param int $perpage
  @param bool $returnexactcount Return the exact total users using count_record or not.
  @return array with two or three elements:
  int totalusers Number users matching the search. (This element only exist if $returnexactcount was set to true)
  array users List of user objects returned by the query.
  boolean moreusers True if there are still more users, otherwise is False.
  @throws dml_exception
docstring_tokens: Searches other users and returns paginated results