sends the wishlist to the user specified in $this->aUserInput. redirectes
back to the wishlist page of the current user on success.
354661
protected function SendWishlist()
    {
        if (!is_array($this->aUserInput)) {
            $this->aUserInput = array();
        }
        $oMsgManager = TCMSMessageManager::GetInstance();
        // validate input
        $oUser = TdbDataExtranetUser::GetInstance();
        if ($this->SendWishlistDataValid() && $oUser->IsLoggedIn()) {
            $oWishList = &$oUser->GetWishlist();
            if (!is_null($oWishList)) {
                if ($oWishList->SendPerMail($this->aUserInput['to_mail'], $this->aUserInput['to_name'], $this->aUserInput['comment'])) {
                    $oMsgManager->AddMessage(self::MSG_CONSUMER_NAME, 'WISHLIST-SEND-MAIL', $this->aUserInput);
                    $oShop = TdbShop::GetInstance();
                    $sURL = $oShop->GetLinkToSystemPage('wishlist');
                    $this->controller->HeaderURLRedirect($sURL);
                    $oMsgManager->AddMessage(self::MSG_CONSUMER_NAME, 'WISHLIST-UNABLE-TO-SEND-MAIL', $this->aUserInput);
                }
            }
        }
    }
33584
public function send()
    {
        deprecationWarning('Response::send() will be removed in 4.0.0');

        if ($this->hasHeader('Location') && $this->_status === 200) {
            $this->statusCode(302);
        }

        $this->_setContent();
        $this->sendHeaders();

        if ($this->_file) {
            $this->_sendFile($this->_file, $this->_fileRange);
            $this->_file = null;
            $this->_fileRange = [];
        } else {
            $this->_sendContent($this->body());
        }

        if (function_exists('fastcgi_finish_request')) {
            fastcgi_finish_request();
        }
    }
1050513
private function authorise()
	{
		$url = $this->getOption('authoriseURL') . '?oauth_token=' . $this->token['key'];

		if ($this->getOption('scope'))
		{
			$scope = \is_array($this->getOption('scope')) ? implode(' ', $this->getOption('scope')) : $this->getOption('scope');
			$url .= '&scope=' . urlencode($scope);
		}

		if ($this->getOption('sendheaders'))
		{
			$this->application->redirect($url);
		}
	}
1011192
public function callbackSubmit()
    {
        // Get values from the submitted form
        $name       = $this->form->value("user");
        $password      = $this->form->value("password");

        $user = new User();
        $user->setDb($this->di->get("db"));
        $res = $user->verifyPassword($name, $password);

        if (!$res) {
            $this->form->rememberValues();
            $this->form->addOutput("User or password did not match.");
            return false;
        }

        $this->di->get('session')->set("user", $name); # set user in session
        $this->di->get("response")->redirect("user/profile");
    }
714716
public function sendWishList()
    {
        if (!\OxidEsales\Eshop\Core\Registry::getSession()->checkSessionChallenge()) {
            return false;
        }

        $aParams = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('editval', true);
        if (is_array($aParams)) {
            $oUtilsView = \OxidEsales\Eshop\Core\Registry::getUtilsView();
            $oParams = ( object ) $aParams;
            $this->setEnteredData(( object ) \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('editval'));

            if (!isset($aParams['rec_name']) || !isset($aParams['rec_email']) ||
                !$aParams['rec_name'] || !$aParams['rec_email']
            ) {
                return $oUtilsView->addErrorToDisplay('ERROR_MESSAGE_COMPLETE_FIELDS_CORRECTLY', false, true);
            } else {
                if ($oUser = $this->getUser()) {
                    $sFirstName = 'oxuser__oxfname';
                    $sLastName = 'oxuser__oxlname';
                    $sSendEmail = 'send_email';
                    $sUserNameField = 'oxuser__oxusername';
                    $sSendName = 'send_name';
                    $sSendId = 'send_id';

                    $oParams->$sSendEmail = $oUser->$sUserNameField->value;
                    $oParams->$sSendName = $oUser->$sFirstName->getRawValue() . ' ' . $oUser->$sLastName->getRawValue();
                    $oParams->$sSendId = $oUser->getId();

                    $this->_blEmailSent = oxNew(\OxidEsales\Eshop\Core\Email::class)->sendWishlistMail($oParams);
                    if (!$this->_blEmailSent) {
                        return $oUtilsView->addErrorToDisplay('ERROR_MESSAGE_CHECK_EMAIL', false, true);
                    }
                }
            }
        }
    }
929949
def get(self, request, *args, **kwargs):
        
        activated_user = self.activate(*args, **kwargs)
        if activated_user:
            users_signals.user_activated.send(
                sender=self.__class__,
                user=activated_user,
                request=request
            )
            return redirect(self.success_url)
        return super().get(request, *args, **kwargs)
165613
public function send()
    {
        $vars = $this->templateContainer->getTemplateVars();
        $this->checkInvoice($vars);

        parent::send();
    }
656179
def send(self, request, **kwargs):
        
        # Set defaults that the hooks can utilize to ensure they always have
        # the correct parameters to reproduce the previous request.
        kwargs.setdefault('stream', self.stream)
        kwargs.setdefault('verify', self.verify)
        kwargs.setdefault('cert', self.cert)
        kwargs.setdefault('proxies', self.proxies)

        # It's possible that users might accidentally send a Request object.
        # Guard against that specific failure case.
        if isinstance(request, Request):
            raise ValueError('You can only send PreparedRequests.')

        # Set up variables needed for resolve_redirects and dispatching of hooks
        allow_redirects = kwargs.pop('allow_redirects', True)
        stream = kwargs.get('stream')
        hooks = request.hooks

        # Get the appropriate adapter to use
        adapter = self.get_adapter(url=request.url)

        # Start time (approximately) of the request
        start = preferred_clock()

        # Send the request
        r = adapter.send(request, **kwargs)

        # Total elapsed time of the request (approximately)
        elapsed = preferred_clock() - start
        r.elapsed = timedelta(seconds=elapsed)

        # Response manipulation hooks
        r = dispatch_hook('response', hooks, r, **kwargs)

        # Persist cookies
        if r.history:

            # If the hooks create history then we want those cookies too
            for resp in r.history:
                extract_cookies_to_jar(self.cookies, resp.request, resp.raw)

        extract_cookies_to_jar(self.cookies, request, r.raw)

        # Redirect resolving generator.
        gen = self.resolve_redirects(r, request, **kwargs)

        # Resolve redirects if allowed.
        history = [resp for resp in gen] if allow_redirects else []

        # Shuffle things around if there's history.
        if history:
            # Insert the first (original) request at the start
            history.insert(0, r)
            # Get the last request made
            r = history.pop()
            r.history = history

        # If redirects aren't being followed, store the response on the Request for Response.next().
        if not allow_redirects:
            try:
                r._next = next(self.resolve_redirects(r, request, yield_requests=True, **kwargs))
            except StopIteration:
                pass

        if not stream:
            r.content

        return r
1128521
def accept
      @proxy_deposit_request.transfer!(params[:reset])
      current_user.can_receive_deposits_from << @proxy_deposit_request.sending_user if params[:sticky]
      redirect_to hyrax.transfers_path, notice: "Transfer complete"
    end
294924
def post(self, *args, **kwargs):
        
        prev_step = self.request.POST.get('wizard_prev_step', None)
        if prev_step and prev_step in self.get_form_list():
            self.storage.current_step = prev_step
            return redirect(self.url_name, step=prev_step)
        return super(NamedUrlWizardView, self).post(*args, **kwargs)
1151746
def send(self, request):
        ''''''
        return self.session.send(request(self.url, self.auth))
1083882
public function SendHeaders() {
      // TODO: ALWAYS RENDER OR REDIRECT FROM THE CONTROLLER OR HEADERS WILL NOT BE SENT!! PUT THIS IN DOCS!!!
      foreach ($this->_Headers as $Name => $Value) {
         if ($Name != 'Status')
            header($Name.': '.$Value, TRUE);
         else {
            $Code = array_shift($Shift = explode(' ', $Value));
            header($Name.': '.$Value, TRUE, $Code);
         }
      }
      // Empty the collection after sending
      $this->_Headers = array();
   }
989690
def send!

      # Send the request
      request = HTTParty.post(self.target, :body => {
        :payload => generate_payload.to_json
      })

      unless request.code.eql? 200
        false
      end

      true

    end
287710
public function addToWishlist($wishlist_action_model)
    {
        $errors = $this->error();

        if (empty($errors)) {
            $result = $wishlist_action_model->add($this->getSubmitted());
        } else {
            $result = array(
                'redirect' => '',
                'severity' => 'warning',
                'message' => $this->format($errors)
            );
        }

        if ($this->isAjax()) {
            $this->outputJson($result);
        }

        $this->redirect($result['redirect'], $result['message'], $result['severity']);
    }
1070186
public function send(): void
    {
        $body = $this->getBody();

        $this->sendCookies();

        switch (true) {
            case 'CLI' === $this->type:
                // no CLI response
                return;
            case null === $body:
            case StatusCode::NO_CONTENT === $this->getStatusCode():
                $response = new EmptyResponse($this->getStatusCode(), $this->getHeaders());
                break;
            case StatusCode::MOVED_PERMANENTLY === $this->getStatusCode():
            case StatusCode::FOUND === $this->getStatusCode():
                $response = new RedirectResponse(
                    $this->getHeader('Location'),
                    $this->getStatusCode(),
                    $this->getHeaders()
                );
                break;
            case 'JSON' === $this->type:
                // JSON response
                // setup messages
                if (Messages::count()) {
                    $this->setHeader('Bluz-Notify', json_encode(Messages::popAll()));
                }

                // encode body data to JSON
                $response = new JsonResponse(
                    $body,
                    $this->getStatusCode(),
                    $this->getHeaders()
                );
                break;
            case 'FILE' === $this->type:
                // File attachment
                $response = new AttachmentResponse(
                    $this->body->getData()->get('FILE'),
                    $this->getStatusCode(),
                    $this->getHeaders()
                );
                break;
            case 'HTML' === $this->type:
            default:
                // HTML response
                $response = new HtmlResponse(
                    (string)$body,
                    $this->getStatusCode(),
                    $this->getHeaders()
                );
                break;
        }

        $emitter = new SapiEmitter();
        $emitter->emit($response);
    }
481537
function send(to, done) {
    if (to.constructor !== Array) to = [to]

    var sent = []
    var cb = !done ? null : ((e,r) => {
      sent.push(e||r)
      if (sent.length == to.length)
        done(null, to.length == 1 ? sent[0] : sent)
    })

    for (var user of to) {
      var msg = opts.raw ||
                Composer.render(Object.assign({to:user},opts))
      dispatch.toUser(user, msg, opts, cb)
    }
  }
792115
public function init()
    {
        parent::init();

        $request = $this->getRequest();

        if (in_array($request->getActionName(), $this->tokenReturnActions)) {
            // Tell the system where to return to after a survey has been taken
            $this->currentUser->setSurveyReturn($request);
        }
    }