public function logout()
    {
        $this->defaultData();
        $eventManager = $this->getServiceLocator()->get(EventManager::SERVICE_ID);

        $logins = $this->getSession()->getUser()->getPropertyValues(UserRdf::PROPERTY_LOGIN);
        $eventManager->trigger(new LogoutSucceedEvent(current($logins)));


        common_session_SessionManager::endSession();
                /* @var $urlRouteService DefaultUrlService */
                $urlRouteService = $this->getServiceLocator()->get(DefaultUrlService::SERVICE_ID);

        $this->redirect($urlRouteService->getRedirectUrl('logout'));
    }
public function logout()
    {
        $this->defaultData();
        $eventManager = $this->getServiceLocator()->get(EventManager::SERVICE_ID);

        $logins = $this->getSession()->getUser()->getPropertyValues(UserRdf::PROPERTY_LOGIN);
        $eventManager->trigger(new LogoutSucceedEvent(current($logins)));


        common_session_SessionManager::endSession();
                /* @var $urlRouteService DefaultUrlService */
                $urlRouteService = $this->getServiceLocator()->get(DefaultUrlService::SERVICE_ID);

        $this->redirect($urlRouteService->getRedirectUrl('logout'));
    }
public function logout ( ) { $ this -> defaultData ( ) ; $ eventManager = $ this -> getServiceLocator ( ) -> get ( EventManager :: SERVICE_ID ) ; $ logins = $ this -> getSession ( ) -> getUser ( ) -> getPropertyValues ( UserRdf :: PROPERTY_LOGIN ) ; $ eventManager -> trigger ( new LogoutSucceedEvent ( current ( $ logins ) ) ) ; common_session_SessionManager :: endSession ( ) ; /* @var $urlRouteService DefaultUrlService */ $ urlRouteService = $ this -> getServiceLocator ( ) -> get ( DefaultUrlService :: SERVICE_ID ) ; $ this -> redirect ( $ urlRouteService -> getRedirectUrl ( 'logout' ) ) ; }
Logout, destroy the session and back to the login page
Logout destroy the session and back to the login page