Add registration functionality and update authentication views

- Implemented a new method in AuthController to display the registration form with localized labels and session error handling.
- Updated the login view to include a link for account creation.
- Enhanced the registration view with a link to the login form.
- Removed the obsolete showRegisterPage view to streamline the codebase.
This commit is contained in:
2025-06-30 14:10:40 +02:00
parent 8e1a13ea27
commit d711bc6152
5 changed files with 25 additions and 2 deletions

View File

@@ -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'];