You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Require two factor authentication for the ACP login only not working #50
Missing code in public function is_tfa_required, between MODE_REQUIRED_FOR_ACP_LOGIN and MODE_REQUIRED_FOR_ADMIN, is basically making those settings identical.
return ($admin); should work?
Suggested solution:
public function is_tfa_required($user_id, $admin = false, $userdata = array())
{
if (sizeof($this->get_modules()) == 0)
{
return false;
}
switch ($this->config['tfa_mode'])
{
case session_helper_interface::MODE_DISABLED:
return false;
case session_helper_interface::MODE_NOT_REQUIRED:
return $this->is_tfa_registered($user_id);
case session_helper_interface::MODE_REQUIRED_FOR_ACP_LOGIN:
return ($admin);
case session_helper_interface::MODE_REQUIRED_FOR_ADMIN:
return $this->do_permission_check($user_id, $userdata, 'a_');
case session_helper_interface::MODE_REQUIRED_FOR_MODERATOR:
return $this->do_permission_check($user_id, $userdata, array('m_', 'a_'));
case session_helper_interface::MODE_REQUIRED:
return true;
default:
return false;
}
Activity