original_string: public function add_from_sql($sql, $params) {
          global $DB;
          $userids = $DB->get_records_sql($sql, $params);
          if (!empty($userids)) {
              $this->userids = array_merge($this->userids, $userids);
          }
      }
code: public function add_from_sql($sql, $params) {
          global $DB;
          $userids = $DB->get_records_sql($sql, $params);
          if (!empty($userids)) {
              $this->userids = array_merge($this->userids, $userids);
          }
      }
code_tokens: public function add_from_sql ( $ sql , $ params ) { global $ DB ; $ userids = $ DB -> get_records_sql ( $ sql , $ params ) ; if ( ! empty ( $ userids ) ) { $ this -> userids = array_merge ( $ this -> userids , $ userids ) ; } }
docstring: Add sql and params to return user IDs.
  
  @param string $sql The sql string to return user IDs.
  @param array $params Parameters for the sql statement.
docstring_tokens: Add sql and params to return user IDs .