original_string: public function add_user_contexts(array $userids) : contextlist {
          global $DB;
  
          list($useridsql, $useridparams) = $DB->get_in_or_equal($userids, SQL_PARAMS_NAMED);
          $sql = "SELECT DISTINCT ctx.id
                    FROM {context} ctx
                   WHERE ctx.contextlevel = :contextlevel
                     AND ctx.instanceid $useridsql";
          return $this->add_from_sql($sql, ['contextlevel' => CONTEXT_USER] + $useridparams);
      }
code: public function add_user_contexts(array $userids) : contextlist {
          global $DB;
  
          list($useridsql, $useridparams) = $DB->get_in_or_equal($userids, SQL_PARAMS_NAMED);
          $sql = "SELECT DISTINCT ctx.id
                    FROM {context} ctx
                   WHERE ctx.contextlevel = :contextlevel
                     AND ctx.instanceid $useridsql";
          return $this->add_from_sql($sql, ['contextlevel' => CONTEXT_USER] + $useridparams);
      }
code_tokens: public function add_user_contexts ( array $ userids ) : contextlist { global $ DB ; list ( $ useridsql , $ useridparams ) = $ DB -> get_in_or_equal ( $ userids , SQL_PARAMS_NAMED ) ; $ sql = "SELECT DISTINCT ctx.id
                    FROM {context} ctx
                   WHERE ctx.contextlevel = :contextlevel
                     AND ctx.instanceid $useridsql" ; return $ this -> add_from_sql ( $ sql , [ 'contextlevel' => CONTEXT_USER ] + $ useridparams ) ; }
docstring: Adds the user contexts for given users.
  
  @param array $userids
  @return $this
docstring_tokens: Adds the user contexts for given users .