/**
  * Prepare redirect URL for logged in customer
  *
  * Redirect customer to the last page visited after logging in.
  *
  * @return void
  */
 protected function processLoggedCustomer()
 {
     // Set default redirect URL for logged in customer
     $this->applyRedirect($this->customerUrl->getAccountUrl());
     if (!$this->scopeConfig->isSetFlag(CustomerUrl::XML_PATH_CUSTOMER_STARTUP_REDIRECT_TO_DASHBOARD, ScopeInterface::SCOPE_STORE)) {
         $referer = $this->request->getParam(CustomerUrl::REFERER_QUERY_PARAM_NAME);
         if ($referer) {
             $referer = $this->urlDecoder->decode($referer);
             if ($this->url->isOwnOriginUrl()) {
                 $this->applyRedirect($referer);
             }
         }
     } elseif ($this->session->getAfterAuthUrl()) {
         $this->applyRedirect($this->session->getAfterAuthUrl(true));
     }
 }
Exemplo n.º 2
0
 /**
  * @return string
  */
 public function getHref()
 {
     return $this->_customerUrl->getAccountUrl();
 }