From 537673748f0b01539fc5839c2af1bacbefafc86d Mon Sep 17 00:00:00 2001 From: George Halkiadakis Date: Fri, 5 May 2023 04:07:05 +0300 Subject: the penalty form (input, new record) --- public/app/controllers/Auth.php | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'public/app/controllers/Auth.php') diff --git a/public/app/controllers/Auth.php b/public/app/controllers/Auth.php index 118b4d0..f1e9819 100644 --- a/public/app/controllers/Auth.php +++ b/public/app/controllers/Auth.php @@ -62,9 +62,17 @@ class Auth { // set cookie for connected user setcookie( CONNECTION_COOKIE, - 'connected;'. $user->getName(), - time()+60*60*10, // 10 hours - '/' + rawurlencode(json_encode( + [ 'rid' => $record['role_id'], 'name' => $user->getName() ], + JSON_UNESCAPED_UNICODE + )), + [ + 'expires' =>time()+60*60*10, // 10 hours + 'path' => '/', + // 'domain' => COOKIE_DOMAIN, + 'secure' => COOKIE_SECURE, + 'samesite' => COOKIE_SAMESITE + ] ); // login OK, set Token in session @@ -174,7 +182,10 @@ class Auth { ]); - Render::view('user/invitation', ['form' => $form]); + Render::view('user/invitation', [ + 'form' => $form, + 'invitation_number' => $user->invitation + ]); } -- cgit v1.2.3