From be4e88cc9a30ecaa2fd7582aca96da5a59f0b51d Mon Sep 17 00:00:00 2001 From: Jay Date: Thu, 3 Mar 2022 17:28:53 +0100 Subject: [PATCH] Improve password reset UI --- src/pages/register.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/pages/register.php b/src/pages/register.php index 42e5fbb3..bbd4607d 100644 --- a/src/pages/register.php +++ b/src/pages/register.php @@ -8,7 +8,12 @@ use wishthis\Page; -$page = new page(__FILE__, 'Register'); +$passwordReset = isset($_GET['password-reset'], $_GET['token']); + +$pageTitle = $passwordReset ? 'Reset password' : 'Register'; +$buttonSubmit = $passwordReset ? 'Reset' : 'Register'; + +$page = new page(__FILE__, $pageTitle); if (isset($_POST['email'], $_POST['password']) && !empty($_POST['planet'])) { $users = $database->query('SELECT * FROM `users`;')->fetchAll(); @@ -171,7 +176,7 @@ $page->navigation();
- + Login