summaryrefslogtreecommitdiff
path: root/app/Template/twofactor/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Template/twofactor/index.php')
-rw-r--r--app/Template/twofactor/index.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/app/Template/twofactor/index.php b/app/Template/twofactor/index.php
index 36b92653..4c4ca088 100644
--- a/app/Template/twofactor/index.php
+++ b/app/Template/twofactor/index.php
@@ -15,10 +15,16 @@
<?php if ($user['twofactor_activated'] == 1): ?>
<div class="listing">
<p><?= t('Secret key: ') ?><strong><?= $this->e($user['twofactor_secret']) ?></strong> (base32)</p>
- <p><br/><img src="<?= $qrcode_url ?>"/><br/><br/></p>
+
+ <?php if (! empty($qrcode_url)): ?>
+ <p><br/><img src="<?= $qrcode_url ?>"/><br/><br/></p>
+ <?php endif ?>
+
<p>
- <?= t('This QR code contains the key URI: ') ?><strong><?= $this->e($key_url) ?></strong>
- <br/><br/>
+ <?php if (! empty($key_url)): ?>
+ <?= t('This QR code contains the key URI: ') ?><strong><?= $this->e($key_url) ?></strong>
+ <br/><br/>
+ <?php endif ?>
<?= t('Save the secret key in your TOTP software (by example Google Authenticator or FreeOTP).') ?>
</p>
</div>