Update home.blade.php

Added option to override registration, even if disabled with the setting in the database.

This is something that probably 99.999% of users will never need, but I really need a function like this for my personal instance.
If "REGISTER_OVERRIDE=true" is added to the .env config file, users will be able to register no matter what is set with the setting in the database. This is useful if two LittleLink Custom instances access the same database, but one should allow registration and the other should not.

If this causes any errors in the future, I will remove this.
This commit is contained in:
Julian Prieber 2022-05-02 21:41:02 +02:00 committed by GitHub
parent 5cf80b0eb3
commit 8555a8eeef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -72,6 +72,8 @@ foreach($pages as $page)
@if (Route::has('register') and $page->register == 'true')
<a href="{{ route('register') }}" class="underline spacing">Register</a>
@elseif (env('REGISTER_OVERRIDE') === true)
<a href="{{ route('register') }}" class="underline spacing">Register</a>
@endif
@endauth
@endif