Prevent unnecessary double cookie refresh when logging in as admin

This commit is contained in:
Kijin Sung 2026-04-30 23:13:05 +09:00
parent 7f1a61fb83
commit 019950c8a8
2 changed files with 3 additions and 3 deletions

View file

@ -226,9 +226,9 @@ class ModuleObject extends BaseObject
}
// Refresh session
if (!isset($_SESSION['RHYMIX']['admin_accessed']))
if (!isset($_SESSION['RHYMIX']['admin_accessed']) && !headers_sent())
{
if (!headers_sent())
if (!isset($_SESSION['RHYMIX']['last_refresh']) || $_SESSION['RHYMIX']['last_refresh'] < time() - 10)
{
$_SESSION['RHYMIX']['admin_accessed'] = \RX_TIME;
Rhymix\Framework\Session::refresh(true);