Do not show the back up code description if codes are fresh
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 26 Nov 2020 15:46:51 +0000 (16:46 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 26 Nov 2020 15:46:51 +0000 (16:46 +0100)
The phrasing does not really apply to the fresh set of codes.

com.woltlab.wcf/templates/multifactorManageBackup.tpl
wcfsetup/install/files/lib/system/user/multifactor/BackupMultifactorMethod.class.php

index cf8aae514d5ba84c4be913bb9a6acb75e11738c7..15c3642d88eef0ac94a97b418d36b6f33de4f399 100644 (file)
@@ -1,4 +1,4 @@
-{lang}wcf.user.security.multifactor.backup.existingCodes.description{/lang}
+{if !$isUnveiled}{lang}wcf.user.security.multifactor.backup.existingCodes.description{/lang}{/if}
 <ol class="nativeList multifactorBackupCodes">
 {foreach from=$codes item='code'}
 <li>
index a837b0f3279c5099491890ee707d2db113f8c34b..18dbdd29233b62447c5e8314af5e076fd572ac41 100644 (file)
@@ -115,6 +115,7 @@ class BackupMultifactorMethod implements IMultifactorMethod {
                                                ->templateName('multifactorManageBackup')
                                                ->variables([
                                                        'codes' => $codes,
+                                                       'isUnveiled' => $returnData !== null,
                                                ]),
                                ]);
                        $form->appendChild($statusContainer);