diff --git a/Controller/AuthController.php b/Controller/AuthController.php index 614c4ef..78e8511 100644 --- a/Controller/AuthController.php +++ b/Controller/AuthController.php @@ -30,6 +30,21 @@ class AuthController unset($_SESSION['auth_errors'], $_SESSION['auth_validData']); } + public function showRegistrationForm() + { + $this->view->setVars([ + 'labels' => [ + "email" => "E-Mail-Adresse", + "password" => "Passwort", + "password_repeat" => "Passwort wiederholen", + "old_password" => "Altes Passwort" + ], + 'errors' => $_SESSION['auth_errors'] ?? [], + 'validData' => $_SESSION['auth_validData'] ?? [] + ]); + unset($_SESSION['auth_errors'], $_SESSION['auth_validData']); + } + public function login() { $email = $_POST['email']; $password = $_POST['password']; diff --git a/Views/Auth/login.phtml b/Views/Auth/login.phtml index 14e1532..374f0f2 100644 --- a/Views/Auth/login.phtml +++ b/Views/Auth/login.phtml @@ -28,6 +28,9 @@ include dirname(__DIR__).'/header.phtml'; +