Skip to content

Commit

Permalink
https://www.admidio.org/forum/viewtopic.php?t=10062
Browse files Browse the repository at this point in the history
  • Loading branch information
Fasse committed Jan 5, 2025
1 parent 36eb3d0 commit a0703f2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions adm_program/system/classes/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ public function __construct(Database $database, string $cookiePrefix = '')
$sessionId = session_id();
}

if ($sessionId === '') {
session_regenerate_id();
$sessionId = session_id();
}

$this->cookieAutoLoginId = $cookiePrefix . '_AUTO_LOGIN_ID';

if (is_int($sessionId)) {
Expand Down Expand Up @@ -356,6 +361,7 @@ public function regenerateId()
session_regenerate_id();

$this->setValue('ses_session_id', session_id());
$this->setValue('ses_timestamp', DATETIME_NOW);
$this->save();
}

Expand Down

0 comments on commit a0703f2

Please sign in to comment.