From 38f28c3e087057460ef60818b8091911d96f504b Mon Sep 17 00:00:00 2001 From: Thies Mueller Date: Fri, 8 Jan 2021 16:13:50 +0100 Subject: [PATCH 1/5] add forgot password link --- login.php | 1 + 1 file changed, 1 insertion(+) diff --git a/login.php b/login.php index aa62402..a25cb68 100644 --- a/login.php +++ b/login.php @@ -45,5 +45,6 @@ Your password:
+forgot password -- 2.34.1 From 268c11c0d668f28e7988cc7423be72de078ab237 Mon Sep 17 00:00:00 2001 From: Thies Mueller Date: Fri, 8 Jan 2021 16:14:11 +0100 Subject: [PATCH 2/5] initial touch. doesn't send out passwords. --- forgot.php | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 forgot.php diff --git a/forgot.php b/forgot.php new file mode 100644 index 0000000..a4f1858 --- /dev/null +++ b/forgot.php @@ -0,0 +1,43 @@ +prepare("SELECT * FROM users WHERE email = :email"); + $result = $statement->execute(array('email' => $email)); + $user = $statement->fetch(); + + if ($user !== true ) { + die('successfull. check your inbox.'); + } else { + $errorMessage = "somethings wrong (maybe wrong email?)
"; + } + +} +?> + + + + Forgot Password + + + + + +
+Your E-Mail Adress:
+

+ + + + +
+i know my password again! + + -- 2.34.1 From d2733c5b099c29da9273c1340bdfd250b7b7f8e9 Mon Sep 17 00:00:00 2001 From: Thies Mueller Date: Fri, 8 Jan 2021 16:16:22 +0100 Subject: [PATCH 3/5] commited to wrong branch --- forgot.php | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 forgot.php diff --git a/forgot.php b/forgot.php deleted file mode 100644 index a4f1858..0000000 --- a/forgot.php +++ /dev/null @@ -1,43 +0,0 @@ -prepare("SELECT * FROM users WHERE email = :email"); - $result = $statement->execute(array('email' => $email)); - $user = $statement->fetch(); - - if ($user !== true ) { - die('successfull. check your inbox.'); - } else { - $errorMessage = "somethings wrong (maybe wrong email?)
"; - } - -} -?> - - - - Forgot Password - - - - - -
-Your E-Mail Adress:
-

- - - - -
-i know my password again! - - -- 2.34.1 From 097742260a10ea58ec9b668a9df6ef806e00ac5c Mon Sep 17 00:00:00 2001 From: Thies Mueller Date: Fri, 8 Jan 2021 16:26:21 +0100 Subject: [PATCH 4/5] this is hacky but maybe it works... --- sendmail.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 sendmail.php diff --git a/sendmail.php b/sendmail.php new file mode 100644 index 0000000..8d175db --- /dev/null +++ b/sendmail.php @@ -0,0 +1,23 @@ + -- 2.34.1 From 12eb264e57a107984578948158b68baebbbe67b8 Mon Sep 17 00:00:00 2001 From: Thies Mueller Date: Fri, 8 Jan 2021 16:27:25 +0100 Subject: [PATCH 5/5] added a message at the end --- sendmail.php | 1 + 1 file changed, 1 insertion(+) diff --git a/sendmail.php b/sendmail.php index 8d175db..9e450fd 100644 --- a/sendmail.php +++ b/sendmail.php @@ -21,3 +21,4 @@ $headers = 'From: '.$sender.' '. "\r\n" . mail($to, $subject, $message, $headers); ?> +

Maybe there is a mail in your inbox now...

\ No newline at end of file -- 2.34.1