Exemplo n.º 1
0
 public function logoutAction()
 {
     // cas   logout
     $cas = new CAServer();
     if ($cas->logout()) {
         $cas->delRedisUserInfo();
         $this->session->destroy();
         $key = substr(md5($this->di['sysconfig']['siteUrl']), 5, 15);
         setcookie($key, '', $_SERVER['REQUEST_TIME'] - 3600, '/');
         $this->response->redirect('login');
     } else {
         echo "<script>alert('退出失败,请重新尝试');window.history.back();</script>";
     }
     $this->view->disable();
 }