| | |
| | | .($returnUrl ? '?service='.urlencode($returnUrl) : ''); |
| | | } |
| | | |
| | | public function logout($returnUrl = NULL) { |
| | | public function logoutLocal() { |
| | | @session_start(); |
| | | unset($_SESSION[$this->sessionName]); |
| | | } |
| | | |
| | | public function logout($returnUrl = NULL) { |
| | | $this->logoutLocal(); |
| | | if($this->isAuthenticated()) { |
| | | unset($_SESSION[$this->sessionName]); |
| | | header('Location: '.$this->logoutUrl($returnUrl)); |
| | | die(); |
| | | } elseif($returnUrl) { |
| | |
| | | return $_SESSION[$this->sessionName]; |
| | | } elseif(isset($_REQUEST['ticket'])) { |
| | | $user = $this->verifyTicket($_REQUEST['ticket']); |
| | | session_regenerate_id(); |
| | | $_SESSION[$this->sessionName] = $user; |
| | | return $user; |
| | | } else { |