Skip to content
Permalink
Browse files

Added two-factor authentication display and clearing to admin.

  • Loading branch information...
cubiclesoft committed Feb 20, 2019
1 parent 37d1800 commit 1bfa24e7062fdf87bccf92ed40d9602bfb46d367
Showing with 30 additions and 0 deletions.
  1. +30 −0 providers/sso_login/index.php
@@ -873,6 +873,9 @@ public function Config()
}
}
// Reset two-factor authentication.
if (!$sso_settings["sso_login"]["require_two_factor"] && isset($_REQUEST["reset_two_factor_method"]) && $_REQUEST["reset_two_factor_method"] === "Yes") $userinfo["two_factor_method"] = "";
if (BB_GetPageMessageType() != "error")
{
try
@@ -989,6 +992,33 @@ public function Config()
"select" => BB_GetValue("reset_password", "0")
);
// Two-factor authentication.
$options = array("" => "None");
foreach ($this->activemodules as $key => &$instance)
{
$name = $instance->GetTwoFactorName();
if ($name !== false) $options[$key] = $name;
}
if (count($options))
{
$contentopts["fields"][] = array(
"title" => "Two-Factor Authentication Method",
"type" => "static",
"value" => (isset($options[$userinfo["two_factor_method"]]) ? $options[$userinfo["two_factor_method"]] : $userinfo["two_factor_method"])
);
if (!$sso_settings["sso_login"]["require_two_factor"])
{
$contentopts["fields"][] = array(
"type" => "checkbox",
"name" => "reset_two_factor_method",
"value" => "Yes",
"display" => "Clear two-factor authentication method",
"check" => false
);
}
}
foreach ($g_sso_login_modules as $key => $info)
{
if ($sso_settings["sso_login"]["modules"][$key]["_a"])

0 comments on commit 1bfa24e

Please sign in to comment.
You can’t perform that action at this time.