Redirect to login when clicking notes and no user logged in
This commit is contained in:
parent
24c8f38c4d
commit
1a5a069844
@ -18,6 +18,12 @@ class NotesController
|
|||||||
|
|
||||||
public function showNotes()
|
public function showNotes()
|
||||||
{
|
{
|
||||||
|
# Redirect zum Login wenn kein User eingeloggt ist
|
||||||
|
if(!Isset($_SESSION['role']))
|
||||||
|
{
|
||||||
|
header("Location: ?controller=User&do=showUserLoginForm");
|
||||||
|
}
|
||||||
|
|
||||||
$sortBy = $_GET['sort_by'] ?? 'updated_at';
|
$sortBy = $_GET['sort_by'] ?? 'updated_at';
|
||||||
$sortOrder = strtoupper($_GET['sort_order'] ?? 'DESC');
|
$sortOrder = strtoupper($_GET['sort_order'] ?? 'DESC');
|
||||||
$isAdmin = $_SESSION['role'] === 'admin';
|
$isAdmin = $_SESSION['role'] === 'admin';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user