public function logout(Request $request)
    {
        $this->dispatch(PhraseaEvents::LOGOUT, new LogoutEvent($this->app));
        $this->getAuthenticator()->closeAccount();

        $this->app->addFlash('info', $this->app->trans('Vous etes maintenant deconnecte. A bientot.'));

        $response = $this->app->redirectPath('homepage', [
            'redirect' => $request->query->get("redirect")
        ]);

        $response->headers->clearCookie('persistent');
        $response->headers->clearCookie('last_act');

        return $response;
    }
public function logout(Request $request)
    {
        $this->dispatch(PhraseaEvents::LOGOUT, new LogoutEvent($this->app));
        $this->getAuthenticator()->closeAccount();

        $this->app->addFlash('info', $this->app->trans('Vous etes maintenant deconnecte. A bientot.'));

        $response = $this->app->redirectPath('homepage', [
            'redirect' => $request->query->get("redirect")
        ]);

        $response->headers->clearCookie('persistent');
        $response->headers->clearCookie('last_act');

        return $response;
    }
public function logout ( Request $ request ) { $ this -> dispatch ( PhraseaEvents :: LOGOUT , new LogoutEvent ( $ this -> app ) ) ; $ this -> getAuthenticator ( ) -> closeAccount ( ) ; $ this -> app -> addFlash ( 'info' , $ this -> app -> trans ( 'Vous etes maintenant deconnecte. A bientot.' ) ) ; $ response = $ this -> app -> redirectPath ( 'homepage' , [ 'redirect' => $ request -> query -> get ( "redirect" ) ] ) ; $ response -> headers -> clearCookie ( 'persistent' ) ; $ response -> headers -> clearCookie ( 'last_act' ) ; return $ response ; }
Logout from Phraseanet

@param  Request $request The current request
@return RedirectResponse
Logout from Phraseanet