Skip to content

Commit

Permalink
Merge pull request SimpleMachines#8001 from Oldiesmann/fix_tfa_undefined
Browse files Browse the repository at this point in the history
Fix "undefined index" errors on TFA login
  • Loading branch information
Tyrsson committed Jan 5, 2024
2 parents 6c8bbf5 + 1e4957c commit 09c9dce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

Expand Down

0 comments on commit 09c9dce

Please sign in to comment.