diff --git a/resources/views/pages/login.twig b/resources/views/pages/login.twig index a96b41ad..2a6441c2 100644 --- a/resources/views/pages/login.twig +++ b/resources/views/pages/login.twig @@ -28,6 +28,22 @@ {% endfor %} +
+
+

{{ __('Register') }}

+ {% if has_permission_to('register') and config('registration_enabled') %} + {% if config('enable_password') %} +

{{ __('Please sign up, if you want to help us!') }}

+ {{ __('Register') }} » + {% else %} +

{{ __('Registration is only available via external login.') }}

+ {% endif %} + {% else %} + {{ m.alert(__('Registration is disabled.'), 'danger') }} + {% endif %} +
+
+
@@ -95,33 +111,5 @@
- -
-
-

{{ __('Register') }}

- {% if has_permission_to('register') and config('registration_enabled') %} - {% if config('enable_password') %} -

{{ __('Please sign up, if you want to help us!') }}

- {{ __('Register') }} » - {% else %} -

{{ __('Registration is only available via external login.') }}

- {% endif %} - {% else %} - {{ m.alert(__('Registration is disabled.'), 'danger') }} - {% endif %} -
- -
-

{{ __('What can I do?') }}

-

{{ __('Please read about the jobs you can do to help us.') }}

- - {{ __('Teams/Job description') }} » - -
- - -
{% endblock %} diff --git a/src/Controllers/AuthController.php b/src/Controllers/AuthController.php index 860d5679..0ac82841 100644 --- a/src/Controllers/AuthController.php +++ b/src/Controllers/AuthController.php @@ -62,7 +62,7 @@ class AuthController extends BaseController */ public function login(): Response { - return $this->showLogin(); + return !$this->auth->user() ? $this->showLogin() : $this->redirect->to($this->config->get('home_site')); } /**