Correct login href value based on logged-in state.

This commit is contained in:
Alex Tselegidis 2022-01-17 18:06:31 +01:00
parent 2b0eb8d18b
commit a8b5062bd3

View file

@ -12,7 +12,7 @@
<?= ucfirst(config('language')) ?> <?= ucfirst(config('language')) ?>
</span> </span>
<a class="backend-link badge bg-primary text-decoration-none" href="<?= site_url('calendar'); ?>"> <a class="backend-link badge bg-primary text-decoration-none" href="<?= session('user_id') ? site_url('calendar') : site_url('login'); ?>">
<i class="fas fa-sign-in-alt me-2"></i> <i class="fas fa-sign-in-alt me-2"></i>
<?= session('user_id') ? lang('backend_section') : lang('login') ?> <?= session('user_id') ? lang('backend_section') : lang('login') ?>
</a> </a>