From 7a13d53e43c7db7fe39474208ffa54ba2906d308 Mon Sep 17 00:00:00 2001 From: polo Date: Tue, 24 Jun 2025 23:57:59 +0200 Subject: =?UTF-8?q?petites=20am=C3=A9liorations=20au=20syst=C3=A8me=20de?= =?UTF-8?q?=20mot=20de=20passe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controller/post.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/controller/post.php') diff --git a/src/controller/post.php b/src/controller/post.php index b0bc6a0..3ba0656 100644 --- a/src/controller/post.php +++ b/src/controller/post.php @@ -220,6 +220,14 @@ if($_SERVER['REQUEST_METHOD'] === 'POST' && $_SESSION['admin'] === true) header("Location: " . new URL(['page' => $_GET['from']])); die; } + elseif(isset($_GET['action']) && $_GET['action'] === 'modif_mdp' + && isset($_POST['login']) && isset($_POST['old_password']) && isset($_POST['new_password']) + && isset($_POST['modify_password_hidden']) && empty($_POST['modify_password_hidden'])) + { + changePassword($entityManager); + header("Location: " . new URL(['page' => $_GET['from']])); + die; + } else{ header("Location: " . new URL(['error' => 'paramètres inconnus'])); die; @@ -230,5 +238,8 @@ if($_SERVER['REQUEST_METHOD'] === 'POST' && $_SESSION['admin'] === true) else{ require '../src/controller/ajax.php'; } + + require '../src/controller/ajax_calendar_admin.php'; } -require '../src/controller/ajax_calendar.php'; \ No newline at end of file + +require '../src/controller/ajax_calendar_visitor.php'; -- cgit v1.2.3