Skip to content

Commit b08968c

Browse files
authored
Merge pull request #8015 from Oldiesmann/fix_tfa_logout
Fix error when logging out with TFA enabled
2 parents 707c3fc + 92cb45c commit b08968c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Actions/Logout.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public function execute(bool $internal = false, bool $redirect = true): void
124124
if (!empty(Config::$modSettings['tfa_mode']) && !empty(User::$me->id) && !empty($_COOKIE[Config::$cookiename . '_tfa'])) {
125125
list(, , $exp) = Utils::jsonDecode($_COOKIE[Config::$cookiename . '_tfa'], true);
126126

127-
Cookie::setTFACookie((int) $exp - time(), $salt, Cookie::encrypt(User::$me->tfa_backup, $salt));
127+
Cookie::setTFACookie((int) $exp - time(), User::$me->id, Cookie::encrypt(User::$me->tfa_backup, $salt));
128128
}
129129

130130
session_destroy();

0 commit comments

Comments
 (0)