From 0d64bf728c05ab5a469d479f403175e18880f725 Mon Sep 17 00:00:00 2001 From: sehnryr Date: Sat, 15 Oct 2022 19:00:35 +0200 Subject: [PATCH] remove `register.php` since the admin is hard-coded --- login.php | 1 - register.php | 56 ---------------------------------------------------- 2 files changed, 57 deletions(-) delete mode 100644 register.php diff --git a/login.php b/login.php index 46051c3..d5efae2 100644 --- a/login.php +++ b/login.php @@ -54,7 +54,6 @@ if (isset($_POST['login'])) { - Créer un compte \ No newline at end of file diff --git a/register.php b/register.php deleted file mode 100644 index 2a9daef..0000000 --- a/register.php +++ /dev/null @@ -1,56 +0,0 @@ - - */ - -require_once 'resources/config.php'; -require_once 'resources/database.php'; -require_once LIBRARY_PATH . '/redirect.php'; -require_once LIBRARY_PATH . '/exceptions.php'; - -$db = new Database(); - -if (isset($_POST['register'])) { - $name = $_POST['name']; - $email = $_POST['email']; - $password = $_POST['password']; - - try { - $success = $db->createUser($name, $email, $password); - if ($success) { - redirect('admin.php'); - } - } catch (AuthenticationException $e) { - // pass - } catch (DuplicateEmailException $e) { - // pass - } -} -?> - - - - - - - Interpromos - Inscription - - - -

Inscription

-
- - - - - - - -
- Se connecter - - - \ No newline at end of file