Skip to content

Commit

Permalink
Merge pull request #2801 from piotrmocko/patch-10
Browse files Browse the repository at this point in the history
Two factor authentication on front-end
  • Loading branch information
infograf768 committed Apr 16, 2014
2 parents d495b3c + 18d0ba0 commit 0a18e21
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 1 addition & 3 deletions components/com_users/views/login/tmpl/default_login.php
Expand Up @@ -52,9 +52,7 @@
<?php endif; ?>
<?php endforeach; ?>

<?php $tfa = JPluginHelper::getPlugin('twofactorauth'); ?>

<?php if (!is_null($tfa) && $tfa != array()): ?>
<?php if ($this->tfa): ?>
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getField('secretkey')->label; ?>
Expand Down
4 changes: 4 additions & 0 deletions components/com_users/views/login/view.html.php
Expand Up @@ -53,6 +53,10 @@ public function display($tpl = null)
{
$this->setLayout($active->query['layout']);
}

require_once JPATH_ADMINISTRATOR . '/components/com_users/helpers/users.php';
$tfa = UsersHelper::getTwoFactorMethods();
$this->tfa = is_array($tfa) && count($tfa) > 1;

//Escape strings for HTML output
$this->pageclass_sfx = htmlspecialchars($this->params->get('pageclass_sfx'));
Expand Down

0 comments on commit 0a18e21

Please sign in to comment.