public function setupTwoFactorAuthentication()
{
// Two factor authentication check
$jVersion = new JVersion();
if (version_compare($jVersion->getShortVersion(), '3.2.0', '>=') && ($this->user->guest))
{
$db = JFactory::getDbo();
// Check if TFA is enabled. If not, just return false
$query = $db->getQuery(true)
->select('COUNT(*)')
->from('#__extensions')
->where('enabled=' . $db->q(1))
->where('folder=' . $db->q('twofactorauth'));
$db->setQuery($query);
$tfaCount = $db->loadResult();
if ($tfaCount > 0)
{
$this->tfaLoaded = true;
}
}
$this->tfaLoaded = false; /* ADDED TO FORCE TWO-FACTOR AUTHENTICATION OFF*/
}
Join our newsletter to get alerts for Joomla releases, tips and tricks and extension updates.