From a69890c9700b03b46c2b5988e68237561601d268 Mon Sep 17 00:00:00 2001 From: RundelhausCode Date: Tue, 9 Mar 2021 14:43:39 +0100 Subject: [PATCH] fix --- Backend/Controllers/FileHandler/upload.php | 3 ++- Backend/Controllers/Group/Group.php | 13 +++++++++---- Frontend/index.php | 6 ++++++ 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/Backend/Controllers/FileHandler/upload.php b/Backend/Controllers/FileHandler/upload.php index 70f0be5..6e89751 100644 --- a/Backend/Controllers/FileHandler/upload.php +++ b/Backend/Controllers/FileHandler/upload.php @@ -1,7 +1,8 @@ group_id); + if($password = Password::firstWhere('remember_token', $token)){ + return Group::find($password->group_id); + } + return null; +} + +function isLogin(){ + return isset($_SESSION["token"]); } \ No newline at end of file diff --git a/Frontend/index.php b/Frontend/index.php index 6443e36..aa35020 100644 --- a/Frontend/index.php +++ b/Frontend/index.php @@ -1,3 +1,9 @@