From 1e4957cac2f8a38351a2bca4e3d1594234051d8f Mon Sep 17 00:00:00 2001 From: Michael Eshom Date: Thu, 4 Jan 2024 22:32:47 -0500 Subject: [PATCH] Fix "undefined index" errors on TFA login Signed-off-by: Michael Eshom --- Sources/User.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/User.php b/Sources/User.php index 29a40b5d44..8e3428bbbc 100644 --- a/Sources/User.php +++ b/Sources/User.php @@ -4632,7 +4632,7 @@ protected function __construct(?int $id = null, ?string $dataset = null) self::$loaded[$id] = $this; - if (!isset(self::$profiles[$id]) || self::$dataset_levels[self::$profiles[$id]['dataset']] < self::$dataset_levels[$dataset ?? 'normal']) { + if (!empty(self::$profiles[$id]) || self::$dataset_levels[self::$profiles[$id]['dataset']] < self::$dataset_levels[$dataset ?? 'normal']) { self::loadUserData((array) $id, self::LOAD_BY_ID, $dataset ?? 'normal'); }