From 8c539b98e29da1073a27e4845c8c9ee8ddacfdde Mon Sep 17 00:00:00 2001 From: Marcel Date: Sun, 28 Oct 2018 17:36:46 +0100 Subject: [PATCH] Add email support for password reset --- application/controllers/Login.php | 13 +- application/views/emails/password_reset.php | 404 ++++++++++++++++++++ application/views/login.php | 20 +- assets/css/login.css | 6 + assets/js/login.js | 25 +- 5 files changed, 448 insertions(+), 20 deletions(-) create mode 100644 application/views/emails/password_reset.php diff --git a/application/controllers/Login.php b/application/controllers/Login.php index e82c180..92e9752 100644 --- a/application/controllers/Login.php +++ b/application/controllers/Login.php @@ -196,19 +196,8 @@ $resetKey = $this->LoginModel->createForgetPasswordKey($loginData['username']); // TODO: E-Mail send - $this->load->library('email'); - $message = ""; + $this->EmailModel->sendMail($loginData['email'], 'Passwort zurücksetzen auf KingOfDog.eu', 'password_reset', ['userHash' => base64_encode($loginData['username']), 'resetKey' => $resetKey]); -// $config['mailtype'] = "html"; -// $this->mail->initialize($config); - - $this->email->from('noreply@kingofdog.de', 'KingOfDog.de'); - $this->email->to($loginData['email']); - - $this->email->subject('Passwort zurücksetzen'); - $this->email->message($message); - -// $this->email->send(); $notice['state'] = true; $notice['message'] = "Eine E-Mail wurde an dich gesendet! Schau' in dein Postfach und klick auf den Link, um dein Passwort zu ändern!"; } diff --git a/application/views/emails/password_reset.php b/application/views/emails/password_reset.php new file mode 100644 index 0000000..c6d1979 --- /dev/null +++ b/application/views/emails/password_reset.php @@ -0,0 +1,404 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+ + + +
+
+
+ + + + + + + + + +
+ + + + + + +
+   +
+
+ + +
+ +
 
+ KingOfDog Logo + +
 
+
+ + + +
+ +
+

Passwort zurücksetzen

+
+ +
+ + +
+ +
+

So wie es aussieht, hast du dein Passwort vergessen. Das kann vorkommen - überhaupt kein Problem! Durch einfaches Klicken auf den Button unten kannst du dein Passwort zurücksetzen und deinen Account auf KingOfDog.eu weiter benutzen wie immer.

+

Du hast diese E-Mail nicht angefordert? Kein Grund zur Panik! Solltest du Angst um die Sicherheit deines Accounts haben, kannst du dich jederzeit an uns wenden. Schreibe entweder eine Mail an contact@kingofdog.eu oder nutze das Kontakt-Formular auf KingOfDog.eu.

+
+ +
+ + + + + + + +
+ +
+

Sollte der Button nicht funktionieren, besuche folgenden Link:

+
+ +
+ + + + + + + + + +
+ + + + + + +
+   +
+
+ +
+
+
+ +
+
+
+
+
+
+ + + +
+
+
+ + +
+ +
+

Copyright © 2018 KingOfDog.eu, All rights reserved.

 

Du möchtest keine E-Mails mehr von uns erhalten? Bestelle alle E-Mails ab

+
+ +
+ +
+
+
+ +
+
+
+ + + +
+
 
+
+ + + +
+ + Twitter + +
 
+
+ + + +
+ + YouTube + +
 
+
+ +
+
+ +
+
+
+ +
+
+
+ +
+ + + + \ No newline at end of file diff --git a/application/views/login.php b/application/views/login.php index c4809ab..6b67b9d 100644 --- a/application/views/login.php +++ b/application/views/login.php @@ -23,7 +23,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');

Willkommen! Du bist nun erfolgreich ein Mitglied geworden

- Dein Profil + Dein Profil
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
@@ -56,6 +56,22 @@ defined('BASEPATH') OR exit('No direct script access allowed'); + + + +