Skip to content

Commit 2c4a0dc

Browse files
committed
Fixed inability to log in to admin panel if NO_SESSION is set
1 parent 699f737 commit 2c4a0dc

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

core/bootstrap.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
require_once __DIR__ . '/includes/protect.inc.php'; // harden it
2828

29-
if ((! is_cli() && session_status() === PHP_SESSION_NONE) && (!defined('NO_SESSION'))) {
29+
if ((! is_cli() && session_status() === PHP_SESSION_NONE) &&
30+
(defined('IN_MANAGER_MODE') && IN_MANAGER_MODE || !defined('NO_SESSION'))) {
3031
startCMSSession(); // start session
3132
}

core/vendor/evolutioncms-services/user-manager/src/Services/Users/SafelyDestroyUserSessionTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ trait SafelyDestroyUserSessionTrait
2121

2222
protected function safelyDestroyUserSession()
2323
{
24-
if (defined('NO_SESSION')) {
24+
if (defined('NO_SESSION') && !(defined('IN_MANAGER_MODE') && IN_MANAGER_MODE)) {
2525
return;
2626
}
2727

core/vendor/evolutioncms-services/user-manager/src/Services/Users/UserLogin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ public function authProcess()
280280

281281
EvolutionCMS()->cleanupExpiredLocks();
282282
EvolutionCMS()->cleanupMultipleActiveUsers();
283-
if(!defined('NO_SESSION')) {
283+
if((defined('IN_MANAGER_MODE') && IN_MANAGER_MODE) || !defined('NO_SESSION')) {
284284
$this->writeSession();
285285
}
286286
// successful login so reset fail count and update key values

0 commit comments

Comments
 (0)