예제 #1
0
 /**
  * @param string $last
  *
  * @return \Symfony\Component\HttpFoundation\JsonResponse|\Symfony\Component\HttpFoundation\RedirectResponse
  */
 public function execute($last = '')
 {
     $this->authenticationModel->logout();
     if (!empty($last)) {
         $lastPage = base64_decode($last);
         if (!preg_match('/^((acp|users)\\/)/', $lastPage)) {
             return $this->redirect()->temporary($lastPage);
         }
     }
     return $this->redirect()->toNewPage($this->appPath->getWebRoot());
 }