/* Decoded by unphp.net */
\xa\x9\x9jQuery(document).ready(function() {\xa \x9 var message = "";
echo $F3;
echo "";
jQuery('#messages').append("
");
\x9\x9});\xa\x9\x9\xa ";
}
function mo_auth_error_message()
{
$F3 = get_site_option("mo2f_message");
echo "
\x9";
}
private function mo_auth_show_success_message()
{
$current_user = wp_get_current_user();
if (is_multisite() and is_super_admin($current_user->ID)) {
goto Ltt;
}
remove_action("admin_notices", array($this, "mo_auth_success_message"));
add_action("admin_notices", array($this, "mo_auth_error_message"));
goto tYa;
Ltt:
remove_action("network_admin_notices", array($this, "mo_auth_success_message"));
add_action("network_admin_notices", array($this, "mo_auth_error_message"));
remove_action("admin_notices", array($this, "mo_auth_success_message"));
add_action("admin_notices", array($this, "mo_auth_error_message"));
tYa:
}
private function mo_auth_show_error_message()
{
$current_user = wp_get_current_user();
if (is_multisite() and is_super_admin($current_user->ID)) {
goto Pg9;
}
remove_action("admin_notices", array($this, "mo_auth_error_message"));
add_action("admin_notices", array($this, "mo_auth_success_message"));
goto jO2;
Pg9:
remove_action("network_admin_notices", array($this, "mo_auth_error_message"));
add_action("network_admin_notices", array($this, "mo_auth_success_message"));
remove_action("admin_notices", array($this, "mo_auth_error_message"));
add_action("admin_notices", array($this, "mo_auth_success_message"));
jO2:
}
public function mo2f_register_user()
{
global $wpdb;
global $current_user;
$current_user = wp_get_current_user();
global $aq;
$lj = $aq->get_user_detail("mo_2factor_user_registration_status", $current_user->ID);
if (!($this->mo_2factor_is_curl_installed() == 0)) {
goto Q4c;
}
echo "\x9 (";
echo __("Warning: ", "miniorange-2-factor-authentication");
echo " ";
echo __("PHP CURL extension", "miniorange-2-factor-authentication");
echo " ";
echo __("is not installed or disabled", "miniorange-2-factor-authentication");
echo ")
\x9";
Q4c:
$rE = isset($_GET["mo2f_tab"]) ? $_GET["mo2f_tab"] : "mo_2fa_two_fa";
echo "\x9 \xa\x9
\x9\x9
\xa \x9\x9 \xa \x9
";
if ($rE == "mo_2fa_two_fa") {
goto XnR;
}
if ($rE == "mo2f_demo") {
goto oMn;
}
if ($rE == "mo2f_help") {
goto Za5;
}
if (get_site_option("mo2f_deviceid_enabled") && $rE == "advance_option") {
goto HoG;
}
unset($_SESSION["mo2f_google_auth"]);
unset($_SESSION["mo2f_mobile_support"]);
if ($lj == "MO_2_FACTOR_OTP_DELIVERED_SUCCESS" || $lj == "MO_2_FACTOR_OTP_DELIVERED_FAILURE") {
goto xnA;
}
if ($lj == "MO_2_FACTOR_INITIALIZE_MOBILE_REGISTRATION") {
goto J1a;
}
if ($lj == "MO_2_FACTOR_INITIALIZE_TWO_FACTOR") {
goto QYI;
}
if ($lj == "MO_2_FACTOR_PLUGIN_SETTINGS") {
goto AH0;
}
show_user_welcome_page($current_user);
goto bDh;
xnA:
mo2f_show_user_otp_validation_page();
goto bDh;
J1a:
$uV = mo2f_get_activated_second_factor($current_user);
mo2f_show_instruction_to_allusers($current_user, $uV);
goto bDh;
QYI:
mo2f_show_instruction_to_allusers($current_user, "NONE");
goto bDh;
AH0:
$uV = mo2f_get_activated_second_factor($current_user);
mo2f_show_instruction_to_allusers($current_user, $uV);
bDh:
goto e5i;
XnR:
$uV = mo2f_get_activated_second_factor($current_user);
mo2f_select_2_factor_method($current_user, $uV);
echo " \x9\x9\x9
";
goto e5i;
oMn:
unset($_SESSION["mo2f_google_auth"]);
unset($_SESSION["mo2f_mobile_support"]);
show_2_factor_login_demo($current_user);
goto e5i;
Za5:
unset($_SESSION["mo2f_google_auth"]);
unset($_SESSION["mo2f_mobile_support"]);
mo2f_show_help_and_troubleshooting($current_user, false);
goto e5i;
HoG:
unset($_SESSION["mo2f_google_auth"]);
unset($_SESSION["mo2f_mobile_support"]);
show_2_factor_advanced_options($current_user);
e5i:
echo "\x9 \x9 | \xa \x9 \xa\x9 \x9 | \xa\x9
\xa\x9\x9\x9
\xa ";
}
function mo_2factor_is_curl_installed()
{
if (in_array("curl", get_loaded_extensions())) {
goto FK2;
}
return 0;
goto wem;
FK2:
return 1;
wem:
}
function miniorange_user_save_settings()
{
global $wpdb;
global $current_user;
$current_user = wp_get_current_user();
global $aq;
if (current_user_can("manage_options")) {
goto gRr;
}
if (!(isset($_POST["option"]) and $_POST["option"] == "mo_2factor_validate_user_otp")) {
goto YgZ;
}
$wp = '';
if (MO2f_Utility::mo2f_check_empty_or_null($_POST["otp_token"])) {
goto eks;
}
$wp = sanitize_text_field($_POST["otp_token"]);
goto OR_;
eks:
update_site_option("mo2f_message", Mo2fConstants::langTranslate("INVALID_ENTRY"));
$this->mo_auth_show_error_message();
return;
OR_:
$vj = $aq->get_user_detail("mo_2factor_user_email", $current_user->ID);
if (!MO2f_Utility::check_if_email_is_already_registered($current_user->ID, $vj)) {
goto owp;
}
update_site_option("mo2f_message", Mo2fConstants::langTranslate("EMAIL_IN_USE"));
$this->mo_auth_show_error_message();
goto kPY;
owp:
$eO = new Customer_Setup();
$dc = $_SESSION["mo2f_transactionId"];
$CG = json_decode($eO->validate_otp_token("VERIFYEMAIL", null, $dc, $wp, get_site_option("mo2f_customerKey"), get_site_option("mo2f_api_key"), $current_user), true);
if ($CG["status"] == "ERROR") {
goto BSY;
}
if (strcasecmp($CG["status"], "SUCCESS") == 0) {
goto q8r;
}
update_site_option("mo2f_message", Mo2fConstants::langTranslate("INVALID_OTP"));
$aq->update_user_details($current_user->ID, array("mo_2factor_user_registration_status" => "MO_2_FACTOR_OTP_DELIVERED_FAILURE"));
$this->mo_auth_show_error_message();
goto KDU;
q8r:
$this->mo2f_create_user($current_user, $vj);
delete_user_meta($current_user->ID, "mo_2fa_verify_otp_create_account");
KDU:
goto frt;
BSY:
update_site_option("mo2f_message", Mo2fConstants::langTranslate($CG["message"]));
delete_user_meta($current_user->ID, "mo_2fa_verify_otp_create_account");
frt:
kPY:
YgZ:
gRr:
}
function mo2f_create_user($current_user, $vj)
{
$vj = strtolower($vj);
$qf = new Two_Factor_Setup();
global $aq;
if (MO2F_IS_ONPREM) {
goto XvH;
}
$Kk = json_decode($qf->mo_check_user_already_exist($vj), true);
goto THW;
XvH:
$Kk["status"] = "USER_NOT_FOUND";
THW:
if (json_last_error() == JSON_ERROR_NONE) {
goto G4I;
}
update_site_option("mo2f_message", Mo2fConstants::langTranslate("ERROR_DURING_USER_REGISTRATION"));
$this->mo_auth_show_error_message();
goto pP9;
G4I:
if ($Kk["status"] == "ERROR") {
goto AY8;
}
if (strcasecmp($Kk["status"], "USER_FOUND") == 0) {
goto jRl;
}
if (strcasecmp($Kk["status"], "USER_NOT_FOUND") == 0) {
goto Qt_;
}
update_site_option("mo2f_message", Mo2fConstants::langTranslate("ERROR_DURING_USER_REGISTRATION"));
$this->mo_auth_show_error_message();
goto jqG;
jRl:
$aq->update_user_details($current_user->ID, array("mo_2factor_user_registration_with_miniorange" => "SUCCESS", "mo_2factor_user_registration_status" => "MO_2_FACTOR_INITIALIZE_TWO_FACTOR", "mo2f_user_email" => $vj, "mo_2factor_user_email" => ''));
$vj = $aq->get_user_detail("mo2f_user_email", $current_user->ID);
$qf = new Two_Factor_Setup();
$qM = json_decode($qf->mo2f_get_userinfo($vj), true);
$lK = $qM["authType"];
$this->mo2f_set_status($lK, $current_user, $vj);
$F3 = Mo2fConstants::langTranslate("REGISTRATION_SUCCESS") . " " . Mo2fConstants::langTranslate("CLICK_HERE") . " " . Mo2fConstants::langTranslate("CONFIG_2FA");
update_site_option("mo2f_message", $F3);
$this->mo_auth_show_success_message();
goto jqG;
Qt_:
if (MO2F_IS_ONPREM) {
goto gF5;
}
$CG = json_decode($qf->mo_create_user($current_user, $vj), true);
goto N9K;
gF5:
update_user_meta($current_user->ID, "currentMethod", "Email Verification");
$CG["status"] = "SUCCESS";
N9K:
if (json_last_error() == JSON_ERROR_NONE) {
goto Vh8;
}
update_site_option("mo2f_message", Mo2fConstants::langTranslate("ERROR_REG_USER_ADMIN"));
$this->mo_auth_show_error_message();
goto pAc;
Vh8:
if ($CG["status"] == "ERROR") {
goto g2V;
}
if (strcasecmp($CG["status"], "SUCCESS") == 0) {
goto TME;
}
update_site_option("mo2f_message", Mo2fConstants::langTranslate("ERROR_DURING_USER_REGISTRATION"));
$this->mo_auth_show_error_message();
goto vjo;
TME:
$aq->update_user_details($current_user->ID, array("mo_2factor_user_registration_with_miniorange" => "SUCCESS", "mo_2factor_user_registration_status" => "MO_2_FACTOR_INITIALIZE_TWO_FACTOR", "mo2f_user_email" => $vj, "mo_2factor_user_email" => ''));
$vj = $aq->get_user_detail("mo2f_user_email", $current_user->ID);
$F3 = Mo2fConstants::langTranslate("REGISTRATION_SUCCESS") . " " . Mo2fConstants::langTranslate("CLICK_HERE") . " " . Mo2fConstants::langTranslate("CONFIG_2FA");
update_site_option("mo2f_message", $F3);
$this->mo_auth_show_success_message();
vjo:
goto GwL;
g2V:
update_site_option("mo2f_message", Mo2fConstants::langTranslate($CG["message"]));
$this->mo_auth_show_error_message();
GwL:
pAc:
jqG:
goto Hi8;
AY8:
update_site_option("mo2f_message", Mo2fConstants::langTranslate($Kk["message"]));
$this->mo_auth_show_error_message();
Hi8:
pP9:
}
function mo2f_set_status($lK, $current_user, $vj)
{
global $aq;
$qf = new Two_Factor_Setup();
if ($lK == "KBA") {
goto JdB;
}
if ($lK == "MOBILE AUTHENTICATION" || $lK == "SOFT TOKEN" || $lK == "PUSH NOTIFICATIONS") {
goto UE4;
}
if ($lK == "GOOGLE AUTHENTICATOR") {
goto wQL;
}
if ($lK == "SMS AND EMAIL" || $lK == "SMS") {
goto gtO;
}
if ($lK == "EMAIL") {
goto zXM;
}
$qf->mo2f_update_userinfo($vj, "OUT OF BAND EMAIL", null, "API_2FA", true);
$aq->update_user_details($current_user->ID, array("mo2f_email_verification_status" => true));
goto qPx;
JdB:
$aq->update_user_details($current_user->ID, array("mo2f_SecurityQuestions_config_status" => true));
goto qPx;
UE4:
$aq->update_user_details($current_user->ID, array("mo2f_mobile_registration_status" => true));
goto qPx;
wQL:
$aq->update_user_details($current_user->ID, array("mo2f_GoogleAuthenticator_config_status" => true));
goto qPx;
gtO:
$aq->update_user_details($current_user->ID, array("mo2f_otp_registration_status" => true));
goto qPx;
zXM:
$aq->update_user_details($current_user->ID, array("mo2f_email_verification_status" => true));
qPx:
}
}
?>