From 7b12d7a5b2ff46edcd3f7c3b8eff0087bd258b34 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Mon, 16 Sep 2024 15:32:51 +1200 Subject: [PATCH] ENH Only query primary DB --- composer.json | 2 +- src/Models/LoginSession.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 5113acb..504fe6e 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "require": { "php": "^8.1", "silverstripe/admin": "^2", - "silverstripe/framework": "^5.3", + "silverstripe/framework": "^5.4", "symfony/http-foundation": "^6.1", "ua-parser/uap-php": "^3.9.14" }, diff --git a/src/Models/LoginSession.php b/src/Models/LoginSession.php index 5f4a6cb..75d969b 100644 --- a/src/Models/LoginSession.php +++ b/src/Models/LoginSession.php @@ -101,6 +101,8 @@ class LoginSession extends DataObject private static bool $anonymize_ip = false; + private static bool $must_use_primary_db = true; + /** * The length of time between two updates to the LastAccessed field *