From: Tim Düsterhus Date: Thu, 5 Nov 2020 10:03:31 +0000 (+0100) Subject: Implement getStatusText() for the `backup` multifactor method X-Git-Tag: 5.4.0_Alpha_1~555^2~53^2~26 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=276df3933394c3afd49fa6b640de4a954d6060d1;p=GitHub%2FWoltLab%2FWCF.git Implement getStatusText() for the `backup` multifactor method --- diff --git a/com.woltlab.wcf/templates/accountSecurity.tpl b/com.woltlab.wcf/templates/accountSecurity.tpl index 9684b731ae..68eee0901e 100644 --- a/com.woltlab.wcf/templates/accountSecurity.tpl +++ b/com.woltlab.wcf/templates/accountSecurity.tpl @@ -24,7 +24,9 @@ {/if} - {$method->getProcessor()->getStatusText($__wcf->user)} + {if $enabledMultifactorMethods[$method->objectTypeID]|isset} + {$method->getProcessor()->getStatusText($enabledMultifactorMethods[$method->objectTypeID])} + {/if}
diff --git a/wcfsetup/install/files/lib/system/user/multifactor/BackupMultifactorMethod.class.php b/wcfsetup/install/files/lib/system/user/multifactor/BackupMultifactorMethod.class.php index ac3fd59627..a783a9b9b1 100644 --- a/wcfsetup/install/files/lib/system/user/multifactor/BackupMultifactorMethod.class.php +++ b/wcfsetup/install/files/lib/system/user/multifactor/BackupMultifactorMethod.class.php @@ -1,6 +1,5 @@ prepareStatement($sql); + $statement->execute([$setupId]); + + // TODO: Language item + return $statement->fetchSingleColumn()." codes remaining"; } /** diff --git a/wcfsetup/install/files/lib/system/user/multifactor/IMultifactorMethod.class.php b/wcfsetup/install/files/lib/system/user/multifactor/IMultifactorMethod.class.php index 22abe11556..b68bebb573 100644 --- a/wcfsetup/install/files/lib/system/user/multifactor/IMultifactorMethod.class.php +++ b/wcfsetup/install/files/lib/system/user/multifactor/IMultifactorMethod.class.php @@ -1,6 +1,5 @@