big restructure
This commit is contained in:
@@ -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'] ?? ''));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
use MintyPHP\Service\AuthService;
|
||||
use MintyPHP\Service\Auth\AuthService;
|
||||
use MintyPHP\Support\Flash;
|
||||
use MintyPHP\Router;
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
|
||||
use MintyPHP\Service\AuthService;
|
||||
use MintyPHP\Service\Auth\AuthService;
|
||||
|
||||
AuthService::logoutAndRedirect('login');
|
||||
|
||||
@@ -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'] ?? ''));
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
use MintyPHP\Buffer;
|
||||
use MintyPHP\Session;
|
||||
use MintyPHP\Service\UserService;
|
||||
use MintyPHP\Service\User\UserService;
|
||||
|
||||
Buffer::set('title', t('Register'));
|
||||
?>
|
||||
|
||||
@@ -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'] ?? '');
|
||||
|
||||
@@ -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'] ?? '')));
|
||||
|
||||
@@ -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'] ?? '')));
|
||||
|
||||
Reference in New Issue
Block a user