From f33d82ffc11ed3438609d4e7a6baa78cb3305bc3 Mon Sep 17 00:00:00 2001 From: FreddleSpl0it Date: Wed, 3 Jul 2024 15:50:17 +0200 Subject: [PATCH] [Web] use correct user to fetch TFA authenticators --- data/web/inc/functions.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/web/inc/functions.inc.php b/data/web/inc/functions.inc.php index 8e0ac580b..b81bf34ff 100644 --- a/data/web/inc/functions.inc.php +++ b/data/web/inc/functions.inc.php @@ -1560,7 +1560,7 @@ function unset_tfa_key($_data) { } function get_tfa($username = null, $id = null) { global $pdo; - if (isset($_SESSION['mailcow_cc_username'])) { + if (empty($username) && isset($_SESSION['mailcow_cc_username'])) { $username = $_SESSION['mailcow_cc_username']; } elseif (empty($username)) {