<?php


namespace OTP\Handler\Forms;

use OTP\Helper\FormSessionVars;
use OTP\Helper\MoConstants;
use OTP\Helper\MoMessages;
use OTP\Helper\MoOTPDocs;
use OTP\Helper\MoPHPSessions;
use OTP\Helper\MoUtility;
use OTP\Helper\SessionUtils;
use OTP\Objects\FormHandler;
use OTP\Objects\IFormHandler;
use OTP\Objects\VerificationType;
use OTP\Traits\Instance;
use ReflectionException;
use WP_Error;
use WP_User;
class WPLoginForm extends FormHandler implements IFormHandler
{
    use Instance;
    private $_savePhoneNumbers;
    private $_byPassAdmin;
    private $_allowLoginThroughPhone;
    private $_skipPasswordCheck;
    private $_userLabel;
    private $_delayOtp;
    private $_delayOtpInterval;
    private $_skipPassFallback;
    private $_createUserAction;
    private $_timeStampMetaKey = "\155\x6f\166\137\x6c\x61\163\164\137\x76\x65\162\x69\146\151\145\144\137\x64\164\x74\155";
    protected function __construct()
    {
        $this->_isLoginOrSocialForm = TRUE;
        $this->_isAjaxForm = TRUE;
        $this->_formSessionVar = FormSessionVars::WP_LOGIN_REG_PHONE;
        $this->_formSessionVar2 = FormSessionVars::WP_DEFAULT_LOGIN;
        $this->_phoneFormId = "\43\155\x6f\x5f\x70\150\x6f\x6e\x65\x5f\156\165\x6d\x62\145\x72";
        $this->_typePhoneTag = "\x6d\157\x5f\x77\160\x5f\x6c\157\x67\151\156\137\x70\x68\157\156\x65\137\145\156\141\x62\154\145";
        $this->_typeEmailTag = "\x6d\x6f\x5f\x77\x70\x5f\x6c\x6f\147\151\156\137\145\x6d\x61\x69\154\137\145\156\x61\x62\x6c\x65";
        $this->_formKey = "\127\x50\x5f\x44\105\x46\101\x55\114\124\x5f\114\x4f\x47\111\116";
        $this->_formName = mo_("\127\x6f\162\144\120\x72\145\x73\163\40\114\x6f\x67\x69\156\40\x46\x6f\x72\x6d");
        $this->_isFormEnabled = get_mo_option("\x77\x70\137\154\157\x67\x69\x6e\137\145\156\141\x62\x6c\x65");
        $this->_userLabel = get_mo_option("\167\160\137\x75\163\145\162\x6e\141\155\x65\137\x6c\141\x62\x65\x6c\x5f\x74\145\x78\x74");
        $this->_userLabel = $this->_userLabel ? mo_($this->_userLabel) : mo_("\x55\x73\x65\x72\156\x61\x6d\145\54\40\x45\55\155\141\151\154\x20\x6f\162\x20\120\x68\x6f\x6e\145\x20\116\x6f\x2e");
        $this->_skipPasswordCheck = get_mo_option("\167\160\x5f\154\157\x67\151\x6e\x5f\163\x6b\151\x70\x5f\160\x61\163\163\x77\x6f\x72\144");
        $this->_allowLoginThroughPhone = get_mo_option("\167\x70\x5f\154\157\147\x69\156\137\x61\154\154\157\167\x5f\x70\x68\x6f\x6e\x65\x5f\x6c\157\x67\151\x6e");
        $this->_skipPassFallback = get_mo_option("\x77\x70\x5f\x6c\x6f\x67\x69\x6e\x5f\x73\x6b\151\x70\137\x70\x61\x73\163\167\157\x72\x64\x5f\146\x61\154\154\x62\x61\143\x6b");
        $this->_delayOtp = get_mo_option("\167\160\137\x6c\157\x67\151\156\137\144\145\154\x61\x79\x5f\x6f\164\x70");
        $this->_delayOtpInterval = get_mo_option("\167\160\137\x6c\x6f\147\x69\x6e\x5f\144\x65\154\141\171\137\x6f\x74\x70\137\x69\156\x74\145\x72\x76\x61\x6c");
        $this->_delayOtpInterval = $this->_delayOtpInterval ? $this->_delayOtpInterval : 43800;
        $this->_formDocuments = MoOTPDocs::LOGIN_FORM;
        if (!($this->_skipPasswordCheck || $this->_allowLoginThroughPhone)) {
            goto vC;
        }
        add_action("\154\x6f\147\151\156\137\145\156\161\165\145\x75\x65\x5f\163\x63\x72\151\x70\x74\x73", array($this, "\x6d\x69\156\151\157\162\141\x6e\x67\x65\x5f\162\145\x67\x69\x73\x74\x65\x72\137\x6c\x6f\147\151\156\x5f\163\x63\162\151\x70\164"));
        add_action("\x77\x70\137\145\x6e\x71\165\x65\x75\x65\x5f\163\143\162\x69\160\164\163", array($this, "\155\151\x6e\151\157\162\x61\x6e\147\145\137\162\x65\147\151\163\164\145\x72\137\x6c\157\147\151\156\137\x73\143\x72\151\160\x74"));
        vC:
        parent::__construct();
    }
    function handleForm()
    {
        $this->_otpType = get_mo_option("\167\160\137\x6c\157\x67\x69\x6e\x5f\x65\156\x61\142\x6c\145\137\x74\171\x70\145");
        $this->_phoneKey = get_mo_option("\x77\x70\x5f\154\157\x67\151\x6e\137\x6b\145\x79");
        $this->_savePhoneNumbers = get_mo_option("\x77\160\137\x6c\x6f\x67\151\x6e\137\162\x65\x67\151\x73\x74\x65\162\137\x70\x68\x6f\x6e\x65");
        $this->_byPassAdmin = get_mo_option("\167\x70\137\x6c\x6f\x67\151\x6e\137\x62\171\160\141\163\163\137\141\x64\155\x69\156");
        $this->_restrictDuplicates = get_mo_option("\167\x70\137\154\x6f\147\151\x6e\137\162\145\x73\164\x72\151\x63\164\x5f\x64\165\160\x6c\x69\x63\x61\x74\145\x73");
        add_filter("\x61\165\x74\150\145\156\x74\151\x63\x61\164\145", array($this, "\137\x68\x61\156\144\x6c\x65\137\155\157\x5f\x77\x70\x5f\154\157\x67\151\156"), 99, 3);
        add_action("\x77\160\x5f\141\152\141\170\x5f\155\157\55\x61\144\155\151\156\x2d\x63\150\145\143\153", array($this, "\x69\x73\101\144\x6d\151\x6e"));
        add_action("\x77\160\x5f\x61\x6a\141\170\137\x6e\x6f\x70\162\151\x76\137\155\157\55\141\144\x6d\x69\156\55\143\150\145\143\x6b", array($this, "\x69\x73\101\x64\x6d\151\156"));
        if (!class_exists("\x55\x4d")) {
            goto Ts;
        }
        add_filter("\x77\160\x5f\141\x75\x74\150\145\x6e\x74\151\x63\x61\x74\145\x5f\x75\163\145\162", array($this, "\137\147\145\x74\x5f\x61\x6e\x64\x5f\162\x65\x74\x75\162\156\x5f\165\163\145\162"), 99, 2);
        Ts:
        $this->routeData();
    }
    function isAdmin()
    {
        $lQ = MoUtility::sanitizeCheck("\x75\163\x65\x72\156\141\155\145", $_POST);
        $user = is_email($lQ) ? get_user_by("\145\155\141\151\154", $lQ) : get_user_by("\x6c\x6f\147\151\156", $lQ);
        $SK = MoConstants::SUCCESS_JSON_TYPE;
        $SK = $user ? in_array("\141\x64\x6d\x69\x6e\x69\x73\x74\162\141\164\157\x72", $user->roles) ? $SK : "\x65\162\x72\x6f\x72" : "\145\162\x72\x6f\162";
        wp_send_json(MoUtility::createJson(MoMessages::showMessage(MoMessages::PHONE_EXISTS), $SK));
    }
    function routeData()
    {
        if (array_key_exists("\x6f\160\x74\x69\x6f\156", $_REQUEST)) {
            goto Xy;
        }
        return;
        Xy:
        switch (trim($_REQUEST["\x6f\160\164\151\x6f\x6e"])) {
            case "\x6d\x69\156\151\x6f\x72\141\x6e\147\x65\55\141\152\x61\x78\55\157\164\160\55\147\145\156\x65\162\x61\164\x65":
                $this->_handle_wp_login_ajax_send_otp();
                goto e7;
            case "\x6d\x69\x6e\151\x6f\x72\x61\156\x67\145\x2d\x61\x6a\x61\170\55\x6f\x74\x70\x2d\166\141\x6c\x69\x64\x61\164\145":
                $this->_handle_wp_login_ajax_form_validate_action();
                goto e7;
            case "\155\x6f\x5f\x61\x6a\x61\x78\137\x66\157\162\155\137\166\x61\154\x69\144\x61\164\145":
                $this->_handle_wp_login_create_user_action();
                goto e7;
        }
        KX:
        e7:
    }
    function miniorange_register_login_script()
    {
        wp_register_script("\155\x6f\154\x6f\x67\151\156", MOV_URL . "\151\x6e\x63\154\165\x64\x65\x73\57\152\x73\57\x6c\157\147\x69\156\x66\x6f\162\x6d\x2e\155\x69\x6e\56\x6a\x73", array("\152\x71\x75\x65\x72\x79"));
        wp_localize_script("\155\157\154\x6f\147\x69\x6e", "\x6d\x6f\x76\x61\x72\x6c\157\x67\x69\156", array("\165\163\x65\162\114\141\142\x65\x6c" => $this->_allowLoginThroughPhone ? $this->_userLabel : null, "\x73\153\x69\160\x50\x77\x64\103\150\x65\x63\x6b" => $this->_skipPasswordCheck, "\x73\x6b\x69\x70\120\167\144\x46\x61\x6c\154\142\141\143\153" => $this->_skipPassFallback, "\142\165\164\164\x6f\156\x74\145\170\x74" => mo_("\x4c\x6f\147\151\156\40\167\151\x74\150\40\117\124\120"), "\x69\163\101\144\155\151\x6e\x41\143\164\x69\x6f\x6e" => "\x6d\157\55\x61\144\155\151\156\55\x63\x68\145\x63\153", "\142\x79\120\141\163\163\101\144\x6d\151\x6e" => $this->_byPassAdmin, "\163\151\164\x65\x55\x52\114" => wp_ajax_url()));
        wp_enqueue_script("\x6d\x6f\x6c\157\x67\151\x6e");
    }
    function _get_and_return_user($lQ, $xy)
    {
        if (!is_object($lQ)) {
            goto Xb;
        }
        return $lQ;
        Xb:
        $user = $this->getUser($lQ, $xy);
        if (!is_wp_error($user)) {
            goto X3;
        }
        return $user;
        X3:
        UM()->login()->auth_id = $user->data->ID;
        UM()->form()->errors = null;
        return $user;
    }
    function byPassLogin($user, $Io)
    {
        $oc = get_userdata($user->data->ID);
        $bZ = $oc->roles;
        return in_array("\x61\x64\155\x69\x6e\151\x73\x74\162\x61\x74\x6f\x72", $bZ) && $this->_byPassAdmin || $Io || $this->delayOTPProcess($user->data->ID);
    }
    function _handle_wp_login_create_user_action()
    {
        $du = function ($yq) {
            $lQ = MoUtility::sanitizeCheck("\x6c\157\x67", $yq);
            if ($lQ) {
                goto yJ;
            }
            $aK = array_filter($yq, function ($yU) {
                return strpos($yU, "\165\163\x65\x72\156\141\x6d\145") === 0;
            }, ARRAY_FILTER_USE_KEY);
            $lQ = !empty($aK) ? array_shift($aK) : $lQ;
            yJ:
            return is_email($lQ) ? get_user_by("\x65\x6d\x61\151\x6c", $lQ) : get_user_by("\154\x6f\147\151\156", $lQ);
        };
        $yq = $_POST;
        if (SessionUtils::isStatusMatch($this->_formSessionVar, self::VALIDATED, $this->getVerificationType())) {
            goto sz;
        }
        return;
        sz:
        $user = $du($yq);
        update_user_meta($user->data->ID, $this->_phoneKey, $this->check_phone_length($yq["\155\x6f\137\x70\150\157\156\145\137\156\165\x6d\142\x65\x72"]));
        $this->login_wp_user($user->data->user_login);
    }
    function login_wp_user($lG, $yJ = null)
    {
        $user = is_email($lG) ? get_user_by("\x65\155\141\x69\x6c", $lG) : ($this->allowLoginThroughPhone() && MoUtility::validatePhoneNumber($lG) ? $this->getUserFromPhoneNumber($lG) : get_user_by("\x6c\x6f\147\x69\156", $lG));
        wp_set_auth_cookie($user->data->ID);
        if (!($this->_delayOtp && $this->_delayOtpInterval > 0)) {
            goto QS;
        }
        update_user_meta($user->data->ID, $this->_timeStampMetaKey, time());
        QS:
        $this->unsetOTPSessionVariables();
        do_action("\x77\x70\x5f\x6c\x6f\147\151\156", $user->user_login, $user);
        $sW = MoUtility::isBlank($yJ) ? site_url() : $yJ;
        wp_redirect($sW);
        die;
    }
    function _handle_mo_wp_login($user, $lQ, $xy)
    {
        if (MoUtility::isBlank($lQ)) {
            goto Q9;
        }
        $Io = $this->skipOTPProcess($xy);
        $user = $this->getUser($lQ, $xy);
        if (!is_wp_error($user)) {
            goto Hi;
        }
        return $user;
        Hi:
        if (!$this->byPassLogin($user, $Io)) {
            goto An;
        }
        return $user;
        An:
        $this->startOTPVerificationProcess($user, $lQ, $xy);
        Q9:
        return $user;
    }
    function startOTPVerificationProcess($user, $lQ, $xy)
    {
        $Cw = $this->getVerificationType();
        if (!(SessionUtils::isStatusMatch($this->_formSessionVar, self::VALIDATED, $Cw) || SessionUtils::isStatusMatch($this->_formSessionVar2, self::VALIDATED, $Cw))) {
            goto mD;
        }
        return;
        mD:
        if ($Cw === VerificationType::PHONE) {
            goto f_;
        }
        if (!($Cw === VerificationType::EMAIL)) {
            goto uJ;
        }
        $R7 = $user->data->user_email;
        $this->startEmailVerification($lQ, $R7);
        uJ:
        goto m_;
        f_:
        $sP = get_user_meta($user->data->ID, $this->_phoneKey, true);
        $sP = $this->check_phone_length($sP);
        $this->askPhoneAndStartVerification($user, $this->_phoneKey, $lQ, $sP);
        $this->fetchPhoneAndStartVerification($lQ, $xy, $sP);
        m_:
    }
    function getUser($lQ, $xy = null)
    {
        $user = is_email($lQ) ? get_user_by("\x65\x6d\x61\151\x6c", $lQ) : get_user_by("\x6c\x6f\147\151\x6e", $lQ);
        if (!($this->_allowLoginThroughPhone && MoUtility::validatePhoneNumber($lQ))) {
            goto b1;
        }
        $user = $this->getUserFromPhoneNumber($lQ);
        b1:
        if (!($user && !$this->isLoginWithOTP($user->roles))) {
            goto ID;
        }
        $user = wp_authenticate_username_password(NULL, $user->data->user_login, $xy);
        ID:
        return $user ? $user : new WP_Error("\x49\x4e\126\101\x4c\111\104\137\125\123\105\122\116\101\115\105", mo_("\40\74\x62\76\105\x52\x52\117\x52\x3a\x3c\x2f\142\x3e\x20\111\x6e\166\141\154\151\x64\x20\125\x73\145\162\x4e\x61\155\x65\56\x20"));
    }
    function getUserFromPhoneNumber($lQ)
    {
        global $wpdb;
        $rF = $wpdb->get_row("\x53\x45\x4c\x45\x43\124\40\x60\x75\163\x65\162\137\x69\144\140\x20\106\x52\x4f\x4d\x20\x60{$wpdb->prefix}\165\x73\x65\162\155\x65\x74\x61\140" . "\x57\110\105\x52\x45\40\x60\x6d\x65\164\x61\137\x6b\145\171\140\40\x3d\x20\x27{$this->_phoneKey}\47\40\x41\116\x44\40\x60\155\x65\164\141\137\x76\x61\154\x75\145\x60\x20\x3d\x20\x20\47{$lQ}\x27");
        return !MoUtility::isBlank($rF) ? get_userdata($rF->user_id) : false;
    }
    function askPhoneAndStartVerification($user, $yU, $lQ, $sP)
    {
        if (MoUtility::isBlank($sP)) {
            goto JG;
        }
        return;
        JG:
        if (!$this->savePhoneNumbers()) {
            goto SB;
        }
        MoUtility::initialize_transaction($this->_formSessionVar);
        $this->sendChallenge(NULL, $user->data->user_login, NULL, NULL, "\145\170\x74\145\x72\x6e\x61\154", NULL, array("\x64\x61\x74\x61" => array("\165\x73\145\162\137\x6c\157\147\151\156" => $lQ), "\155\145\163\163\141\147\145" => MoMessages::showMessage(MoMessages::REGISTER_PHONE_LOGIN), "\146\157\x72\x6d" => $yU, "\143\165\162\x6c" => MoUtility::currentPageUrl()));
        goto dV;
        SB:
        miniorange_site_otp_validation_form(null, null, null, MoMessages::showMessage(MoMessages::PHONE_NOT_FOUND), null, null);
        dV:
    }
    function fetchPhoneAndStartVerification($lQ, $xy, $sP)
    {
        MoUtility::initialize_transaction($this->_formSessionVar2);
        $TG = isset($_REQUEST["\162\145\144\x69\162\145\143\164\137\x74\x6f"]) ? $_REQUEST["\162\x65\144\151\x72\145\x63\x74\x5f\x74\157"] : MoUtility::currentPageUrl();
        $this->sendChallenge($lQ, null, null, $sP, VerificationType::PHONE, $xy, $TG, false);
    }
    function startEmailVerification($lQ, $R7)
    {
        MoUtility::initialize_transaction($this->_formSessionVar2);
        $this->sendChallenge($lQ, $R7, null, null, VerificationType::EMAIL);
    }
    function _handle_wp_login_ajax_send_otp()
    {
        $BT = $_POST;
        if ($this->restrictDuplicates() && !MoUtility::isBlank($this->getUserFromPhoneNumber($BT["\x75\x73\x65\x72\x5f\160\150\157\156\145"]))) {
            goto Cv;
        }
        if (SessionUtils::isOTPInitialized($this->_formSessionVar)) {
            goto BA;
        }
        goto GM;
        Cv:
        wp_send_json(MoUtility::createJson(MoMessages::showMessage(MoMessages::PHONE_EXISTS), MoConstants::ERROR_JSON_TYPE));
        goto GM;
        BA:
        $this->sendChallenge("\x61\152\x61\x78\137\x70\150\157\x6e\x65", '', null, trim($BT["\x75\163\145\x72\x5f\160\x68\x6f\x6e\145"]), VerificationType::PHONE, null, $BT);
        GM:
    }
    function _handle_wp_login_ajax_form_validate_action()
    {
        $BT = $_POST;
        if (SessionUtils::isOTPInitialized($this->_formSessionVar)) {
            goto vj;
        }
        return;
        vj:
        $s9 = MoPHPSessions::getSessionVar("\160\x68\x6f\156\145\137\156\165\155\x62\145\x72\137\x6d\157");
        if (strcmp($s9, $this->check_phone_length($BT["\x75\x73\145\x72\137\160\150\157\156\145"]))) {
            goto Zz;
        }
        $this->validateChallenge($this->getVerificationType());
        goto X9;
        Zz:
        wp_send_json(MoUtility::createJson(MoMessages::showMessage(MoMessages::PHONE_MISMATCH), MoConstants::ERROR_JSON_TYPE));
        X9:
    }
    function handle_failed_verification($te, $j4, $sP, $Cw)
    {
        if (!SessionUtils::isOTPInitialized($this->_formSessionVar)) {
            goto tG;
        }
        SessionUtils::addStatus($this->_formSessionVar, self::VERIFICATION_FAILED, $Cw);
        wp_send_json(MoUtility::createJson(MoUtility::_get_invalid_otp_method(), MoConstants::ERROR_JSON_TYPE));
        tG:
        if (!SessionUtils::isOTPInitialized($this->_formSessionVar2)) {
            goto yV;
        }
        miniorange_site_otp_validation_form($te, $j4, $sP, MoUtility::_get_invalid_otp_method(), "\x70\150\157\156\x65", FALSE);
        yV:
    }
    function handle_post_verification($TG, $te, $j4, $xy, $sP, $yJ, $Cw)
    {
        if (!SessionUtils::isOTPInitialized($this->_formSessionVar)) {
            goto BB;
        }
        SessionUtils::addStatus($this->_formSessionVar, self::VALIDATED, $Cw);
        wp_send_json(MoUtility::createJson('', MoConstants::SUCCESS_JSON_TYPE));
        BB:
        if (!SessionUtils::isOTPInitialized($this->_formSessionVar2)) {
            goto CX;
        }
        $lQ = MoUtility::isBlank($te) ? MoUtility::sanitizeCheck("\x6c\x6f\x67", $_POST) : $te;
        $lQ = MoUtility::isBlank($lQ) ? MoUtility::sanitizeCheck("\x75\163\x65\162\x6e\141\155\145", $_POST) : $lQ;
        $this->login_wp_user($lQ, $yJ);
        CX:
    }
    public function unsetOTPSessionVariables()
    {
        SessionUtils::unsetSession(array($this->_txSessionId, $this->_formSessionVar, $this->_formSessionVar2));
    }
    public function getPhoneNumberSelector($fv)
    {
        if (!$this->isFormEnabled()) {
            goto H3;
        }
        array_push($fv, $this->_phoneFormId);
        H3:
        return $fv;
    }
    private function isLoginWithOTP($TV = array())
    {
        $Ty = mo_("\x4c\157\147\x69\x6e\40\167\x69\164\x68\40\117\x54\120");
        if (!(in_array("\x61\144\155\x69\x6e\x69\x73\x74\162\141\164\x6f\162", $TV) && $this->_byPassAdmin)) {
            goto XC;
        }
        return false;
        XC:
        return MoUtility::sanitizeCheck("\x77\160\55\x73\x75\142\x6d\151\164", $_POST) == $Ty || MoUtility::sanitizeCheck("\154\x6f\147\151\x6e", $_POST) == $Ty || MoUtility::sanitizeCheck("\x6c\157\147\x69\156\164\x79\160\145", $_POST) == $Ty;
    }
    private function skipOTPProcess($xy)
    {
        return $this->_skipPasswordCheck && $this->_skipPassFallback && isset($xy) && !$this->isLoginWithOTP();
    }
    private function check_phone_length($s9)
    {
        $Gg = MoUtility::processPhoneNumber($s9);
        return strlen($Gg) >= 5 ? $Gg : '';
    }
    private function delayOTPProcess($LG)
    {
        if (!($this->_delayOtp && $this->_delayOtpInterval < 0)) {
            goto Q_;
        }
        return TRUE;
        Q_:
        $tH = get_user_meta($LG, $this->_timeStampMetaKey, true);
        if (!MoUtility::isBlank($tH)) {
            goto Dl;
        }
        return FALSE;
        Dl:
        $he = time() - $tH;
        return $this->_delayOtp && $he < $this->_delayOtpInterval * 60;
    }
    function handleFormOptions()
    {
        if (MoUtility::areFormOptionsBeingSaved($this->getFormOption())) {
            goto HB;
        }
        return;
        HB:
        $this->_isFormEnabled = $this->sanitizeFormPOST("\x77\160\x5f\154\x6f\x67\151\156\x5f\145\156\141\x62\x6c\x65");
        $this->_savePhoneNumbers = $this->sanitizeFormPOST("\x77\160\x5f\154\157\147\x69\156\137\162\145\x67\151\x73\164\145\162\x5f\x70\150\x6f\156\x65");
        $this->_byPassAdmin = $this->sanitizeFormPOST("\167\x70\x5f\154\x6f\147\151\156\x5f\x62\x79\x70\x61\163\x73\137\141\144\x6d\151\156");
        $this->_phoneKey = $this->sanitizeFormPOST("\167\160\x5f\x6c\157\147\x69\156\x5f\160\x68\157\x6e\x65\137\146\x69\145\154\144\x5f\x6b\x65\x79");
        $this->_allowLoginThroughPhone = $this->sanitizeFormPOST("\167\160\137\154\157\147\x69\x6e\x5f\x61\154\x6c\x6f\167\x5f\x70\150\157\x6e\145\137\x6c\x6f\147\x69\x6e");
        $this->_restrictDuplicates = $this->sanitizeFormPOST("\167\x70\x5f\x6c\x6f\147\x69\x6e\x5f\x72\145\x73\164\162\151\x63\164\x5f\x64\165\x70\x6c\x69\143\141\164\x65\163");
        $this->_otpType = $this->sanitizeFormPOST("\167\x70\137\154\157\147\x69\156\137\x65\x6e\x61\142\x6c\145\137\164\171\160\145");
        $this->_skipPasswordCheck = $this->sanitizeFormPOST("\x77\160\137\x6c\157\x67\151\x6e\137\x73\x6b\151\x70\x5f\x70\x61\x73\x73\x77\x6f\x72\144");
        $this->_userLabel = $this->sanitizeFormPOST("\x77\x70\x5f\165\x73\145\x72\156\x61\x6d\145\x5f\154\x61\x62\x65\x6c\x5f\164\145\170\164");
        $this->_skipPassFallback = $this->sanitizeFormPOST("\x77\x70\137\x6c\x6f\x67\x69\x6e\x5f\163\153\151\x70\x5f\x70\141\163\x73\167\x6f\x72\x64\137\x66\x61\x6c\x6c\x62\141\143\x6b");
        $this->_delayOtp = $this->sanitizeFormPOST("\167\160\x5f\x6c\157\x67\x69\x6e\x5f\x64\x65\154\x61\x79\x5f\157\x74\x70");
        $this->_delayOtpInterval = $this->sanitizeFormPOST("\167\x70\x5f\154\x6f\x67\151\x6e\137\x64\145\154\141\171\x5f\157\164\160\137\x69\156\x74\145\x72\166\141\154");
        update_mo_option("\167\160\x5f\x6c\x6f\147\x69\x6e\x5f\x65\156\141\x62\x6c\x65\x5f\164\x79\160\x65", $this->_otpType);
        update_mo_option("\x77\x70\137\154\157\x67\151\156\x5f\145\x6e\x61\142\154\x65", $this->_isFormEnabled);
        update_mo_option("\x77\x70\x5f\154\x6f\x67\x69\x6e\x5f\x72\x65\x67\151\x73\x74\145\x72\137\x70\x68\157\x6e\145", $this->_savePhoneNumbers);
        update_mo_option("\167\x70\x5f\x6c\157\x67\x69\156\x5f\142\171\160\x61\x73\163\137\141\144\155\151\x6e", $this->_byPassAdmin);
        update_mo_option("\167\x70\137\x6c\157\x67\151\156\137\153\x65\x79", $this->_phoneKey);
        update_mo_option("\167\x70\x5f\x6c\x6f\x67\x69\156\x5f\141\x6c\154\x6f\167\x5f\160\150\157\x6e\145\137\154\x6f\147\151\x6e", $this->_allowLoginThroughPhone);
        update_mo_option("\x77\160\137\x6c\x6f\x67\x69\156\x5f\x72\x65\163\164\x72\151\143\x74\x5f\x64\165\160\x6c\151\x63\x61\164\145\x73", $this->_restrictDuplicates);
        update_mo_option("\x77\160\x5f\154\x6f\x67\x69\x6e\137\x73\x6b\151\x70\137\160\141\x73\163\167\x6f\x72\144", $this->_skipPasswordCheck);
        update_mo_option("\x77\x70\x5f\x6c\157\147\x69\x6e\137\x73\x6b\151\160\x5f\x70\141\163\x73\x77\x6f\162\x64\137\x66\141\154\x6c\142\x61\143\x6b", $this->_skipPassFallback);
        update_mo_option("\167\x70\x5f\x75\x73\145\x72\156\x61\x6d\x65\x5f\x6c\141\142\x65\x6c\x5f\164\145\170\164", $this->_userLabel);
        update_mo_option("\167\x70\137\x6c\x6f\x67\x69\156\x5f\x64\145\154\141\171\x5f\x6f\x74\160", $this->_delayOtp);
        update_mo_option("\x77\160\x5f\x6c\157\147\151\x6e\137\x64\145\154\x61\171\x5f\x6f\164\160\x5f\x69\x6e\164\145\162\x76\141\154", $this->_delayOtpInterval);
    }
    public function savePhoneNumbers()
    {
        return $this->_savePhoneNumbers;
    }
    function byPassCheckForAdmins()
    {
        return $this->_byPassAdmin;
    }
    function allowLoginThroughPhone()
    {
        return $this->_allowLoginThroughPhone;
    }
    public function getSkipPasswordCheck()
    {
        return $this->_skipPasswordCheck;
    }
    public function getUserLabel()
    {
        return mo_($this->_userLabel);
    }
    public function getSkipPasswordCheckFallback()
    {
        return $this->_skipPassFallback;
    }
    public function isDelayOtp()
    {
        return $this->_delayOtp;
    }
    public function getDelayOtpInterval()
    {
        return $this->_delayOtpInterval;
    }
}
