From 569e4cac2b8c937a7eec4a528d582e8c9bca6730 Mon Sep 17 00:00:00 2001 From: OsaAjani Date: Sat, 23 Jan 2016 15:16:44 +0100 Subject: [PATCH] Fix redirection mot de passe incorect --- controllers/connect.php | 10 +++++----- templates/connect/{login.php => default.php} | 0 2 files changed, 5 insertions(+), 5 deletions(-) rename templates/connect/{login.php => default.php} (100%) diff --git a/controllers/connect.php b/controllers/connect.php index 72041e3..43372a0 100755 --- a/controllers/connect.php +++ b/controllers/connect.php @@ -9,7 +9,7 @@ */ public function byDefault() { - $this->render('connect/login'); + $this->render('connect/default'); } /** @@ -39,7 +39,7 @@ if (!$users = $db->getFromTableWhere('users', ['email' => $email])) { $_SESSION['errormessage'] = 'Identifiants incorrects.'; - header('Location: ' . $this->generateUrl('connect', 'login')); + header('Location: ' . $this->generateUrl('connect')); return false; } @@ -48,7 +48,7 @@ if (sha1($password) != $user['password']) { $_SESSION['errormessage'] = 'Cet e-mail n\'existe pas.'; - header('Location: ' . $this->generateUrl('connect', 'login')); + header('Location: ' . $this->generateUrl('connect')); return false; } @@ -97,12 +97,12 @@ if (!$db->updateTableWhere('users', ['email' => $user['email'], 'password' => $new_password, 'admin' => $user['admin']], ['id' => $user['id']])) { $_SESSION['errormessage'] = 'Impossible de mettre à jour le mot de passe.'; - header('Location: ' . $this->generateUrl('connect', 'login')); + header('Location: ' . $this->generateUrl('connect')); return false; } $_SESSION['successmessage'] = 'Un nouveau mot de passe vous a été envoyé par mail.'; - header('Location: ' . $this->generateUrl('connect', 'login')); + header('Location: ' . $this->generateUrl('connect')); return true; } diff --git a/templates/connect/login.php b/templates/connect/default.php similarity index 100% rename from templates/connect/login.php rename to templates/connect/default.php