public function logoff() { $authManager = new \W\Security\AuthentificationManager(); $authManager->logUserOut(); // on se déconnecte, on retourne à l'accueil $this->redirectToRoute('home'); }
public function deleteaccount() { $passwordError = "Your account has deleted!"; $auth = new \W\Security\AuthentificationManager(); $usermanager = new \Manager\UserManager(); $usermanager->delete($_SESSION['user']['id']); $auth->logUserOut(); setcookie("auth", "", time() - 3600, '/', 'localhost', false, true); $this->redirectToRoute('home', ["passwordError" => $passwordError]); }
function confirmAccount($token, $subscription) { //die(time().'---'.$token.'---->'.$subscription); if ($token != 0 && time() < $token && $subscription == 0) { $response[0] = true; $response[1] = "Log correct but please check your mail for confirmation's account !"; } else { if ($token != 0 && time() > $token && $subscription == 0) { $usermanager = new \Manager\UserManager(); $auth = new \W\Security\AuthentificationManager(); $usermanager->delete($_SESSION['user']['id']); $auth->logUserOut(); setcookie("auth", "", time() - 3600, '/', 'localhost', false, true); $response[0] = false; $response[1] = "Your account don't confirm during 3 days so I deleted it Mother F****r!"; } else { $response[0] = true; $response[1] = "Log correct !"; } } return $response; }
public function logoff() { $authManager = new \W\Security\AuthentificationManager(); $authManager->logUserOut(); $this->redirectToRoute('login'); }
/** * Deconnexion de l'utilisateur * Affichage de la page home **/ public function logOut() { $user = new \W\Security\AuthentificationManager(); $user->logUserOut(); $this->redirectToRoute('home'); }
public function logout() { unset($_SESSION['error']); $auth = new \W\Security\AuthentificationManager(); $auth->logUserOut(); setcookie("auth", "", time() - 3600, '/', 'localhost', false, true); $this->redirectToRoute('home'); }
public function logout() { $auth = new \W\Security\AuthentificationManager(); $auth->logUserOut(); setcookie("auth", "", time() - 3600, '/', '127.0.0.1', false, true); $this->redirectToRoute('log'); }
/** * Page de déconnexion */ public function logout() { $userSecurity = new \W\Security\AuthentificationManager(); // Déconnecte l'utilisateur $userSecurity->logUserOut(); // affiche la page $this->show('user/logout'); }