diff options
Diffstat (limited to 'app/Template')
-rw-r--r-- | app/Template/twofactor/disable.php | 14 | ||||
-rw-r--r-- | app/Template/user/sidebar.php | 4 |
2 files changed, 18 insertions, 0 deletions
diff --git a/app/Template/twofactor/disable.php b/app/Template/twofactor/disable.php new file mode 100644 index 00000000..6909b446 --- /dev/null +++ b/app/Template/twofactor/disable.php @@ -0,0 +1,14 @@ +<div class="page-header"> + <h2><?= t('Disable two factor authentication') ?></h2> +</div> + +<div class="confirm"> + <p class="alert alert-info"> + <?= t('Do you really want to disable the two factor authentication for this user: "%s"?', $user['name'] ?: $user['username']) ?> + </p> + + <div class="form-actions"> + <?= $this->a(t('Yes'), 'twofactor', 'disable', array('user_id' => $user['id'], 'disable' => 'yes'), true, 'btn btn-red') ?> + <?= t('or') ?> <?= $this->a(t('cancel'), 'user', 'show', array('user_id' => $user['id'])) ?> + </div> +</div>
\ No newline at end of file diff --git a/app/Template/user/sidebar.php b/app/Template/user/sidebar.php index f794c609..ff0fb009 100644 --- a/app/Template/user/sidebar.php +++ b/app/Template/user/sidebar.php @@ -42,6 +42,10 @@ <li> <?= $this->a(t('Two factor authentication'), 'twofactor', 'index', array('user_id' => $user['id'])) ?> </li> + <?php elseif ($this->userSession->isAdmin() && $user['twofactor_activated'] == 1): ?> + <li> + <?= $this->a(t('Two factor authentication'), 'twofactor', 'disable', array('user_id' => $user['id'])) ?> + </li> <?php endif ?> <li> |