Skip to content
This repository was archived by the owner on May 26, 2023. It is now read-only.

Commit 7b3f415

Browse files
authored
Merge pull request #199 from ExpDev07/dev
Bugfixes
2 parents a8c347f + 59100ff commit 7b3f415

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

app/Helpers/SessionHelper.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class SessionHelper
88
{
99
const Cookie = 'op_fw_session_store';
1010
const Alphabet = 'abcdefghijklmnopqrstuvwxyz0123456789';
11-
const Lifetime = 60 * 60 * 24 * 365;
11+
const Lifetime = 60 * 60 * 24 * 2;
1212

1313
/**
1414
* Singleton instance
@@ -133,6 +133,8 @@ private function load()
133133
if (file_exists($this->getSessionFile())) {
134134
$json = json_decode(file_get_contents($this->getSessionFile()), true) ?: [];
135135
$this->value = $json;
136+
137+
touch($this->getSessionFile());
136138
} else {
137139
LoggingHelper::log($this->sessionKey, 'Session file did not exist while loading data');
138140
$this->value = [];

app/Http/Middleware/StaffMiddleware.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ protected function checkSessionLock(): bool
109109
LoggingHelper::log($session->getSessionKey(), 'current.detail -> ' . json_encode($detail));
110110
LoggingHelper::log($session->getSessionKey(), 'session.detail -> ' . json_encode($session->get('session_detail')));
111111

112-
$this->error = 'Your session is invalid, please log in again.';
112+
$this->error = 'Your session is invalid, please refresh this page or log in again.';
113113
}
114114

115115
$session->put('session_detail', $detail);

0 commit comments

Comments
 (0)