original_string: public function add_users(array $userids) : userlist {
          global $DB;
  
          if (!empty($userids)) {
              list($useridsql, $useridparams) = $DB->get_in_or_equal($userids, SQL_PARAMS_NAMED);
              $sql = "SELECT DISTINCT u.id
                        FROM {user} u
                       WHERE u.id {$useridsql}";
              $this->add_from_sql('id', $sql, $useridparams);
          }
          return $this;
      }
code: public function add_users(array $userids) : userlist {
          global $DB;
  
          if (!empty($userids)) {
              list($useridsql, $useridparams) = $DB->get_in_or_equal($userids, SQL_PARAMS_NAMED);
              $sql = "SELECT DISTINCT u.id
                        FROM {user} u
                       WHERE u.id {$useridsql}";
              $this->add_from_sql('id', $sql, $useridparams);
          }
          return $this;
      }
code_tokens: public function add_users ( array $ userids ) : userlist { global $ DB ; if ( ! empty ( $ userids ) ) { list ( $ useridsql , $ useridparams ) = $ DB -> get_in_or_equal ( $ userids , SQL_PARAMS_NAMED ) ; $ sql = "SELECT DISTINCT u.id
                        FROM {user} u
                       WHERE u.id {$useridsql}" ; $ this -> add_from_sql ( 'id' , $ sql , $ useridparams ) ; } return $ this ; }
docstring: Adds the user users for given users.
  
  @param   int[]   $userids
  @return  $this
docstring_tokens: Adds the user users for given users .