How I log out


  • GNU/Linux

    Anyone can suggest me how I can log out in the forum? what code or what file.js can I wacth to create a log out ?

    For now I do this:

    (library.js)

    router.get('/client/pagina-utente-cancellato',hostMiddleware.buildHeader,controllers.caricaPaginaUtenteCancellato);
    

    (controllers.js)

    Controllers.caricaPaginaUtenteCancellato=function(req,res,callback){
    	//delete req.session;
    	//console.log(req);
    	req.logout();
    	
    	res.render('client/pagina-utente-cancellato', {});
    };
    

    Buw when I go in /client/pagina-utente-cancellato I must reload to see that the user is
    not logged. I need that in the header I can see "register" and "login" and not the value of current logged user. Anyone can help me?


 

| |