public function logoutAction()
    {
        if ($this->isAuthenticated()) {
            $this->session()->set('user', null);
        }

        $this->setMessage('success', 'Bye Bye !');
        return $this->redirect('/');
    }
public function logoutAction()
    {
        if ($this->isAuthenticated()) {
            $this->session()->set('user', null);
        }

        $this->setMessage('success', 'Bye Bye !');
        return $this->redirect('/');
    }
public function logoutAction ( ) { if ( $ this -> isAuthenticated ( ) ) { $ this -> session ( ) -> set ( 'user' , null ) ; } $ this -> setMessage ( 'success' , 'Bye Bye !' ) ; return $ this -> redirect ( '/' ) ; }
Handles the logout actions.

@return \Symfony\Component\HttpFoundation\RedirectResponse
Handles the logout actions .