big restructure

This commit is contained in:
2026-02-11 19:28:12 +01:00
parent cd59ccd99b
commit 3eb9cc0ac4
209 changed files with 5101 additions and 2459 deletions

View File

@@ -6,7 +6,7 @@ use MintyPHP\Session;
use MintyPHP\Router;
use MintyPHP\Http\Request;
use MintyPHP\I18n;
use MintyPHP\Service\PasswordResetService;
use MintyPHP\Service\Auth\PasswordResetService;
$errors = [];
$email = trim((string) ($_POST['email'] ?? ''));

View File

@@ -1,6 +1,6 @@
<?php
use MintyPHP\Service\AuthService;
use MintyPHP\Service\Auth\AuthService;
use MintyPHP\Support\Flash;
use MintyPHP\Router;

View File

@@ -41,6 +41,8 @@ Buffer::set('title', t('Login'));
</p>
<?php Session::getCsrfInput(); ?>
</form>
<hr>
<p class="text-align-center"><?php e(t('No account yet')); ?>? <a href="register"><?php e(t('Register')); ?></a></p>
<?php if (allowRegistration()): ?>
<hr>
<p class="text-align-center"><?php e(t('No account yet')); ?>? <a href="<?php e(lurl('register')); ?>"><?php e(t('Register')); ?></a></p>
<?php endif; ?>
</article>

View File

@@ -1,5 +1,5 @@
<?php
use MintyPHP\Service\AuthService;
use MintyPHP\Service\Auth\AuthService;
AuthService::logoutAndRedirect('login');

View File

@@ -1,10 +1,15 @@
<?php
use MintyPHP\Service\AuthService;
use MintyPHP\Service\Auth\AuthService;
use MintyPHP\Support\Flash;
use MintyPHP\Router;
$error = false;
if (!allowRegistration()) {
Flash::error(t('Registration is currently disabled'), 'login', 'registration_disabled');
Router::redirect('login');
}
if (isset($_POST['email'])) {
$firstName = trim((string) ($_POST['first_name'] ?? ''));
$lastName = trim((string) ($_POST['last_name'] ?? ''));

View File

@@ -11,7 +11,7 @@
use MintyPHP\Buffer;
use MintyPHP\Session;
use MintyPHP\Service\UserService;
use MintyPHP\Service\User\UserService;
Buffer::set('title', t('Register'));
?>

View File

@@ -6,8 +6,8 @@ use MintyPHP\Session;
use MintyPHP\Router;
use MintyPHP\Http\Request;
use MintyPHP\I18n;
use MintyPHP\Service\PasswordResetService;
use MintyPHP\Service\UserService;
use MintyPHP\Service\Auth\PasswordResetService;
use MintyPHP\Service\User\UserService;
$errors = [];
$password = (string) ($_POST['password'] ?? '');

View File

@@ -6,7 +6,7 @@ use MintyPHP\Session;
use MintyPHP\Router;
use MintyPHP\Http\Request;
use MintyPHP\I18n;
use MintyPHP\Service\PasswordResetService;
use MintyPHP\Service\Auth\PasswordResetService;
$errors = [];
$email = trim((string) ($_POST['email'] ?? ($_SESSION['password_reset_email'] ?? '')));

View File

@@ -4,7 +4,7 @@ use MintyPHP\Buffer;
use MintyPHP\Support\Flash;
use MintyPHP\Session;
use MintyPHP\Router;
use MintyPHP\Service\EmailVerificationService;
use MintyPHP\Service\Auth\EmailVerificationService;
$errors = [];
$email = trim((string) ($_POST['email'] ?? ($_SESSION['email_verification_email'] ?? '')));