Skip to content

Commit

Permalink
Update templates and fix FakeController
Browse files Browse the repository at this point in the history
FakeController now supports blocked accounts.
  • Loading branch information
JanOppolzer committed Feb 27, 2024
1 parent 153f9ec commit 2309f3c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions app/Http/Controllers/FakeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ public function store(Request $request): RedirectResponse|View
$user = User::findOrFail($request->id);
$user->update(['login_at' => now()]);

if (! $user->active) {
return view('blocked');
}

Auth::login($user);
Session::regenerate();

Expand Down
3 changes: 2 additions & 1 deletion resources/views/blocked.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ class="bg-gradient-to-r from-gray-100 dark:from-gray-800 to-gray-100 dark:to-gra
<hr class="hidden">
<p class="text-center opacity-75">
<small class="text-sm">
&copy; 2023 <a class="hover:underline text-blue-500" href="https://www.cesnet.cz">CESNET</a>,
&copy; 2023&ndash;<?= date('Y') ?> <a class="hover:underline text-blue-500"
href="https://www.cesnet.cz">CESNET</a>,
<a class="hover:underline text-blue-500" href="mailto:[email protected]">[email protected]</a>.
</small>
</p>
Expand Down
3 changes: 2 additions & 1 deletion resources/views/partials/footer.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ class="bg-gradient-to-r from-gray-100 dark:from-gray-800 to-gray-100 dark:to-gra
<small class="text-sm">
<a class="hover:underline text-blue-500"
href="{{ __('welcome.pii-link') }}">{{ __('welcome.pii-text') }}</a><br>
&copy; 2023 <a class="hover:underline text-blue-500" href="https://www.cesnet.cz">CESNET</a>,
&copy; 2023&ndash;<?= date('Y') ?> <a class="hover:underline text-blue-500"
href="https://www.cesnet.cz">CESNET</a>,
<a class="hover:underline text-blue-500" href="mailto:[email protected]">[email protected]</a>
</small>
</p>
Expand Down
3 changes: 2 additions & 1 deletion resources/views/welcome.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ class="bg-gradient-to-r from-gray-100 dark:from-gray-800 to-gray-100 dark:to-gra
<small class="text-sm">
<a class="hover:underline text-blue-500"
href="{{ __('welcome.pii-link') }}">{{ __('welcome.pii-text') }}</a><br>
&copy; 2023 <a class="hover:underline text-blue-500" href="https://www.cesnet.cz">CESNET</a>,
&copy; 2023&ndash;<?= date('Y') ?> <a class="hover:underline text-blue-500"
href="https://www.cesnet.cz">CESNET</a>,
<a class="hover:underline text-blue-500" href="mailto:[email protected]">[email protected]</a>.
</small>
</p>
Expand Down

0 comments on commit 2309f3c

Please sign in to comment.