diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2023-12-22 15:12:57 +0000 |
|---|---|---|
| committer | Elmar Ludwig <elmar.ludwig@uni-osnabrueck.de> | 2023-12-22 15:12:57 +0000 |
| commit | b690ffeac508dd8631a95873ef6101a53f125f10 (patch) | |
| tree | 866964f43f882b3a5cf3b83aec756e83689a1edd /lib/classes/TwoFactorAuth.php | |
| parent | 13e5aa83173d27ee925c1e6a4fbc212f0a5618a5 (diff) | |
fixes #3596
Closes #3596
Merge request studip/studip!2492
Diffstat (limited to 'lib/classes/TwoFactorAuth.php')
| -rw-r--r-- | lib/classes/TwoFactorAuth.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/classes/TwoFactorAuth.php b/lib/classes/TwoFactorAuth.php index 5373c9a..70d0567 100644 --- a/lib/classes/TwoFactorAuth.php +++ b/lib/classes/TwoFactorAuth.php @@ -90,12 +90,15 @@ final class TwoFactorAuth return; } - $secret = TFASecret::find($user->id); - if (!$secret) { + if (!self::isEnabledForUser($user)) { return; } - $this->secret = $secret; + if (!TFASecret::exists($user->id)) { + return; + } + + $this->secret = TFASecret::find($user->id); } /** |
