diff options
Diffstat (limited to 'public/app/controllers/Auth.php')
| -rw-r--r-- | public/app/controllers/Auth.php | 19 |
1 files changed, 15 insertions, 4 deletions
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 + ]); } |
