Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

public function updateCustomer($lf, $Xq, $XX, $ul, $pU, $ly, $GK, $tz, $eI, $UR, $Uz, $z4,..

Decoded Output download

<?  public function updateCustomer($lf, $Xq, $XX, $ul, $pU, $ly, $GK, $tz, $eI, $UR, $Uz, $z4, $do, $DO, $tA, $Yq, $S6, $BK, $DH, $VA, $Y6) 
    { 
        $E1 = explode("@", $lf); 
        $this->oauthUtility->log_debug("processUserAction: updateCustomer"); 
        if (!($Xq === null || empty($Xq))) { 
            goto Kk; 
        } 
        $Xq = $E1[0]; 
        $Xq = preg_replace("/[^A-Za-z0-9\-]/", '', $Xq); 
        Kk: 
        if (!($XX === null || empty($XX))) { 
            goto pv; 
        } 
        $XX = $E1[1]; 
        $XX = preg_replace("/[^A-Za-z0-9\-]/", '', $XX); 
        pv: 
        $De = $this->clientDetails["oauth_customer_group_mapping"]; 
        $py = $this->processRoles($VA, $DH, $De, $Y6); 
        $this->oauthUtility->log_debug("Setrole" . $py); 
        if (!(empty($De) || is_null($Y6) || is_null($py))) { 
            goto DF; 
        } 
        $this->oauthUtility->log_debug("ProcessUserAction: inside empty rolemappig"); 
        $Mt = $this->clientDetails["default_role"]; 
        $j2 = $this->clientDetails["default_group"]; 
        $py = $DH ? $this->getRoleIdByName($Mt) : $this->getGroupIdByName($j2); 
        DF: 
        $cO = $this->storeManager->getStore(); 
        $j1 = $this->storeManager->getStore()->getWebsiteId(); 
        $KA = $this->customerFactory->create(); 
        $KA->setWebsiteId($j1)->loadByEmail($lf); 
        if (!(!$this->oauthUtility->isBlank($py) && isset($this->updateFrontendRole) && strcasecmp($this->updateFrontendRole, "checked") === 0)) { 
            goto eO; 
        } 
        $KA->setWebsiteId($j1)->setStore($cO)->setGroupId($py)->setForceConfirmed(true)->save(); 
        eO: 
        if (!(isset($this->updateAttribute) && strcasecmp($this->updateAttribute, "checked") === 0)) { 
            goto Bp; 
        } 
        $KA->setWebsiteId($j1)->setStore($cO)->setFirstname($Xq)->setLastname($XX)->setEmail($lf)->setForceConfirmed(true)->save(); 
        if (!($tz || $pU || $UR || $ly || $Uz || $GK || $eI)) { 
            goto aV; 
        } 
        $Vw = null; 
        $MB = $KA->getDefaultBilling(); 
        if (!isset($MB)) { 
            goto Ye; 
        } 
        $Vw = $this->_addressFactory->create()->load($MB); 
        Ye: 
        if (is_null($MB)) { 
            goto te; 
        } 
        $Vw->setFirstname($Xq); 
        $Vw->setLastname($XX); 
        $this->oauthUtility->log_debug(" exiting updateUserAttributes: phone"); 
        if (!isset($tz)) { 
            goto iT; 
        } 
        $Vw->setTelephone($tz); 
        iT: 
        if (!isset($pU)) { 
            goto Lt; 
        } 
        $Vw->setStreet($pU); 
        Lt: 
        if (!isset($UR)) { 
            goto zK; 
        } 
        $Vw->setCity($UR); 
        zK: 
        if (!isset($ly)) { 
            goto pa; 
        } 
        $pz = $this->collectionFactory->create()->addRegionNameFilter($ly)->getFirstItem()->toArray(); 
        if (!isset($pz["region_id"])) { 
            goto ZR; 
        } 
        $Vw->setRegionId($pz["region_id"]); 
        ZR: 
        pa: 
        if (!isset($Uz)) { 
            goto v8; 
        } 
        $Vw->setCountryId($Uz); 
        v8: 
        if (!isset($eI)) { 
            goto cY; 
        } 
        $Vw->setCompany($eI); 
        cY: 
        if (!isset($GK)) { 
            goto ba; 
        } 
        $Vw->setPostcode($GK); 
        ba: 
        $Vw->save(); 
        goto KO; 
        te: 
        $im = $this->dataAddressFactory->create(); 
        $im->setFirstname($Xq); 
        $im->setLastname($XX); 
        if (!isset($tz)) { 
            goto XA; 
        } 
        $im->setTelephone($tz); 
        XA: 
        if (!isset($pU)) { 
            goto Ma; 
        } 
        $im->setStreet($pU); 
        Ma: 
        if (!isset($UR)) { 
            goto kj; 
        } 
        $im->setCity($UR); 
        kj: 
        if (!isset($Uz)) { 
            goto O9; 
        } 
        $im->setCountryId($Uz); 
        O9: 
        if (!isset($eI)) { 
            goto VP; 
        } 
        $im->setCompany($eI); 
        VP: 
        if (!isset($ly)) { 
            goto tD; 
        } 
        $pz = $this->collectionFactory->create()->addRegionNameFilter($ly)->getFirstItem()->toArray(); 
        if (!isset($pz["region_id"])) { 
            goto OA; 
        } 
        $im->setRegionId($pz["region_id"]); 
        OA: 
        tD: 
        if (!isset($GK)) { 
            goto kU; 
        } 
        $im->setPostcode($GK); 
        kU: 
        $im->setIsDefaultBilling("1"); 
        $im->setSaveInAddressBook("1"); 
        $im->setCustomerId($KA->getId()); 
        try { 
            $im->save(); 
            $KA = $im->getCustomer(); 
        } catch (\Exception $ib) { 
            $this->oauthUtility->log_debug("An error occurred while trying to set address: {$ib->getMessage()}"); 
        } 
        KO: 
        aV: 
        if (!($tA || $z4 || $S6 || $do || $BK || $DO || $Yq)) { 
            goto o3; 
        } 
        $JZ = $KA->getDefaultShipping(); 
        $Ix = $this->_addressFactory->create()->load($JZ); 
        if (is_null($JZ)) { 
            goto q9; 
        } 
        $Ix->setFirstname($Xq); 
        $Ix->setLastname($XX); 
        $this->oauthUtility->log_debug(" exiting updateUserAttributes: phone"); 
        if (!isset($tA)) { 
            goto E5; 
        } 
        $Ix->setTelephone($tA); 
        E5: 
        if (!isset($z4)) { 
            goto kN; 
        } 
        $Ix->setStreet($z4); 
        kN: 
        if (!isset($S6)) { 
            goto pZ; 
        } 
        $Ix->setCity($S6); 
        pZ: 
        if (!isset($do)) { 
            goto zl; 
        } 
        $pz = $this->collectionFactory->create()->addRegionNameFilter($do)->getFirstItem()->toArray(); 
        if (!isset($pz["region_id"])) { 
            goto la; 
        } 
        $Ix->setRegionId($pz["region_id"]); 
        la: 
        zl: 
        if (!isset($BK)) { 
            goto Gg; 
        } 
        $Ix->setCountryId($BK); 
        Gg: 
        if (!isset($Yq)) { 
            goto NS; 
        } 
        $Ix->setCompany($Yq); 
        NS: 
        if (!isset($DO)) { 
            goto I6; 
        } 
        $Ix->setPostcode($DO); 
        I6: 
        $Ix->save(); 
        goto hd; 
        q9: 
        $im = $this->dataAddressFactory->create(); 
        $im->setFirstname($Xq); 
        $im->setLastname($XX); 
        if (!isset($tA)) { 
            goto zw; 
        } 
        $im->setTelephone($tA); 
        zw: 
        if (!isset($z4)) { 
            goto Bc; 
        } 
        $im->setStreet($z4); 
        Bc: 
        if (!isset($S6)) { 
            goto uF; 
        } 
        $im->setCity($S6); 
        uF: 
        if (!isset($do)) { 
            goto h_; 
        } 
        $pz = $this->collectionFactory->create()->addRegionNameFilter($do)->getFirstItem()->toArray(); 
        if (!isset($pz["region_id"])) { 
            goto B9; 
        } 
        $im->setRegionId($pz["region_id"]); 
        B9: 
        h_: 
        if (!isset($BK)) { 
            goto v0; 
        } 
        $im->setCountryId($BK); 
        v0: 
        if (!isset($Yq)) { 
            goto Eg; 
        } 
        $im->setCompany($Yq); 
        Eg: 
        if (!isset($DO)) { 
            goto gZ; 
        } 
        $im->setPostcode($DO); 
        gZ: 
        $im->setIsDefaultShipping("1"); 
        $im->setSaveInAddressBook("1"); 
        $im->setCustomerId($KA->getId()); 
        try { 
            $im->save(); 
            $KA = $im->getCustomer(); 
        } catch (\Exception $ib) { 
            $this->oauthUtility->log_debug("An error occurred while trying to set address: {$ib->getMessage()}"); 
        } 
        hd: 
        o3: 
        Bp: 
        return $KA; 
    } ?>

Did this file decode correctly?

Original Code

public function updateCustomer($lf, $Xq, $XX, $ul, $pU, $ly, $GK, $tz, $eI, $UR, $Uz, $z4, $do, $DO, $tA, $Yq, $S6, $BK, $DH, $VA, $Y6)
    {
        $E1 = explode("\100", $lf);
        $this->oauthUtility->log_debug("\x70\162\157\x63\x65\x73\163\125\x73\145\x72\101\143\x74\151\x6f\156\x3a\40\165\x70\144\x61\164\x65\x43\x75\163\164\x6f\x6d\x65\x72");
        if (!($Xq === null || empty($Xq))) {
            goto Kk;
        }
        $Xq = $E1[0];
        $Xq = preg_replace("\x2f\x5b\x5e\101\55\132\x61\55\x7a\x30\55\x39\134\55\135\57", '', $Xq);
        Kk:
        if (!($XX === null || empty($XX))) {
            goto pv;
        }
        $XX = $E1[1];
        $XX = preg_replace("\x2f\x5b\136\101\55\132\x61\55\x7a\x30\x2d\x39\134\x2d\x5d\57", '', $XX);
        pv:
        $De = $this->clientDetails["\157\x61\x75\164\x68\x5f\x63\165\163\x74\x6f\155\145\162\x5f\x67\x72\157\x75\x70\137\x6d\x61\160\160\151\x6e\147"];
        $py = $this->processRoles($VA, $DH, $De, $Y6);
        $this->oauthUtility->log_debug("\123\x65\164\162\157\x6c\145" . $py);
        if (!(empty($De) || is_null($Y6) || is_null($py))) {
            goto DF;
        }
        $this->oauthUtility->log_debug("\120\162\x6f\143\145\163\163\125\163\x65\x72\101\x63\x74\x69\157\156\x3a\x20\151\156\163\x69\144\x65\40\145\155\160\x74\x79\x20\162\157\x6c\x65\x6d\141\160\160\151\x67");
        $Mt = $this->clientDetails["\144\145\146\141\x75\x6c\x74\x5f\162\157\x6c\145"];
        $j2 = $this->clientDetails["\144\145\x66\141\x75\154\164\x5f\147\x72\x6f\x75\x70"];
        $py = $DH ? $this->getRoleIdByName($Mt) : $this->getGroupIdByName($j2);
        DF:
        $cO = $this->storeManager->getStore();
        $j1 = $this->storeManager->getStore()->getWebsiteId();
        $KA = $this->customerFactory->create();
        $KA->setWebsiteId($j1)->loadByEmail($lf);
        if (!(!$this->oauthUtility->isBlank($py) && isset($this->updateFrontendRole) && strcasecmp($this->updateFrontendRole, "\143\150\x65\143\x6b\145\144") === 0)) {
            goto eO;
        }
        $KA->setWebsiteId($j1)->setStore($cO)->setGroupId($py)->setForceConfirmed(true)->save();
        eO:
        if (!(isset($this->updateAttribute) && strcasecmp($this->updateAttribute, "\x63\150\145\143\153\145\x64") === 0)) {
            goto Bp;
        }
        $KA->setWebsiteId($j1)->setStore($cO)->setFirstname($Xq)->setLastname($XX)->setEmail($lf)->setForceConfirmed(true)->save();
        if (!($tz || $pU || $UR || $ly || $Uz || $GK || $eI)) {
            goto aV;
        }
        $Vw = null;
        $MB = $KA->getDefaultBilling();
        if (!isset($MB)) {
            goto Ye;
        }
        $Vw = $this->_addressFactory->create()->load($MB);
        Ye:
        if (is_null($MB)) {
            goto te;
        }
        $Vw->setFirstname($Xq);
        $Vw->setLastname($XX);
        $this->oauthUtility->log_debug("\x20\145\x78\x69\164\151\156\x67\x20\165\x70\x64\x61\x74\x65\125\x73\145\x72\101\164\x74\x72\x69\142\x75\x74\x65\163\72\40\160\150\157\156\x65");
        if (!isset($tz)) {
            goto iT;
        }
        $Vw->setTelephone($tz);
        iT:
        if (!isset($pU)) {
            goto Lt;
        }
        $Vw->setStreet($pU);
        Lt:
        if (!isset($UR)) {
            goto zK;
        }
        $Vw->setCity($UR);
        zK:
        if (!isset($ly)) {
            goto pa;
        }
        $pz = $this->collectionFactory->create()->addRegionNameFilter($ly)->getFirstItem()->toArray();
        if (!isset($pz["\x72\x65\x67\x69\x6f\x6e\x5f\x69\144"])) {
            goto ZR;
        }
        $Vw->setRegionId($pz["\162\145\147\x69\157\156\x5f\x69\144"]);
        ZR:
        pa:
        if (!isset($Uz)) {
            goto v8;
        }
        $Vw->setCountryId($Uz);
        v8:
        if (!isset($eI)) {
            goto cY;
        }
        $Vw->setCompany($eI);
        cY:
        if (!isset($GK)) {
            goto ba;
        }
        $Vw->setPostcode($GK);
        ba:
        $Vw->save();
        goto KO;
        te:
        $im = $this->dataAddressFactory->create();
        $im->setFirstname($Xq);
        $im->setLastname($XX);
        if (!isset($tz)) {
            goto XA;
        }
        $im->setTelephone($tz);
        XA:
        if (!isset($pU)) {
            goto Ma;
        }
        $im->setStreet($pU);
        Ma:
        if (!isset($UR)) {
            goto kj;
        }
        $im->setCity($UR);
        kj:
        if (!isset($Uz)) {
            goto O9;
        }
        $im->setCountryId($Uz);
        O9:
        if (!isset($eI)) {
            goto VP;
        }
        $im->setCompany($eI);
        VP:
        if (!isset($ly)) {
            goto tD;
        }
        $pz = $this->collectionFactory->create()->addRegionNameFilter($ly)->getFirstItem()->toArray();
        if (!isset($pz["\x72\x65\x67\x69\157\x6e\x5f\151\144"])) {
            goto OA;
        }
        $im->setRegionId($pz["\162\145\147\151\x6f\156\x5f\x69\144"]);
        OA:
        tD:
        if (!isset($GK)) {
            goto kU;
        }
        $im->setPostcode($GK);
        kU:
        $im->setIsDefaultBilling("\x31");
        $im->setSaveInAddressBook("\61");
        $im->setCustomerId($KA->getId());
        try {
            $im->save();
            $KA = $im->getCustomer();
        } catch (\Exception $ib) {
            $this->oauthUtility->log_debug("\x41\x6e\x20\145\162\162\157\162\40\x6f\143\x63\165\x72\x72\x65\x64\x20\167\x68\151\x6c\x65\40\164\x72\171\151\156\147\x20\x74\x6f\x20\x73\145\x74\40\141\x64\144\162\x65\x73\x73\72\x20{$ib->getMessage()}");
        }
        KO:
        aV:
        if (!($tA || $z4 || $S6 || $do || $BK || $DO || $Yq)) {
            goto o3;
        }
        $JZ = $KA->getDefaultShipping();
        $Ix = $this->_addressFactory->create()->load($JZ);
        if (is_null($JZ)) {
            goto q9;
        }
        $Ix->setFirstname($Xq);
        $Ix->setLastname($XX);
        $this->oauthUtility->log_debug("\x20\x65\x78\x69\x74\x69\156\147\40\165\160\x64\141\x74\145\x55\x73\x65\x72\101\164\x74\x72\x69\x62\165\164\145\163\72\x20\x70\150\157\x6e\x65");
        if (!isset($tA)) {
            goto E5;
        }
        $Ix->setTelephone($tA);
        E5:
        if (!isset($z4)) {
            goto kN;
        }
        $Ix->setStreet($z4);
        kN:
        if (!isset($S6)) {
            goto pZ;
        }
        $Ix->setCity($S6);
        pZ:
        if (!isset($do)) {
            goto zl;
        }
        $pz = $this->collectionFactory->create()->addRegionNameFilter($do)->getFirstItem()->toArray();
        if (!isset($pz["\162\x65\147\x69\x6f\x6e\x5f\151\x64"])) {
            goto la;
        }
        $Ix->setRegionId($pz["\162\145\147\x69\x6f\x6e\137\151\x64"]);
        la:
        zl:
        if (!isset($BK)) {
            goto Gg;
        }
        $Ix->setCountryId($BK);
        Gg:
        if (!isset($Yq)) {
            goto NS;
        }
        $Ix->setCompany($Yq);
        NS:
        if (!isset($DO)) {
            goto I6;
        }
        $Ix->setPostcode($DO);
        I6:
        $Ix->save();
        goto hd;
        q9:
        $im = $this->dataAddressFactory->create();
        $im->setFirstname($Xq);
        $im->setLastname($XX);
        if (!isset($tA)) {
            goto zw;
        }
        $im->setTelephone($tA);
        zw:
        if (!isset($z4)) {
            goto Bc;
        }
        $im->setStreet($z4);
        Bc:
        if (!isset($S6)) {
            goto uF;
        }
        $im->setCity($S6);
        uF:
        if (!isset($do)) {
            goto h_;
        }
        $pz = $this->collectionFactory->create()->addRegionNameFilter($do)->getFirstItem()->toArray();
        if (!isset($pz["\x72\145\x67\x69\157\x6e\137\151\144"])) {
            goto B9;
        }
        $im->setRegionId($pz["\x72\x65\x67\x69\157\x6e\x5f\x69\x64"]);
        B9:
        h_:
        if (!isset($BK)) {
            goto v0;
        }
        $im->setCountryId($BK);
        v0:
        if (!isset($Yq)) {
            goto Eg;
        }
        $im->setCompany($Yq);
        Eg:
        if (!isset($DO)) {
            goto gZ;
        }
        $im->setPostcode($DO);
        gZ:
        $im->setIsDefaultShipping("\61");
        $im->setSaveInAddressBook("\x31");
        $im->setCustomerId($KA->getId());
        try {
            $im->save();
            $KA = $im->getCustomer();
        } catch (\Exception $ib) {
            $this->oauthUtility->log_debug("\x41\x6e\x20\145\x72\162\x6f\x72\x20\x6f\x63\143\165\x72\x72\x65\x64\40\167\x68\x69\x6c\x65\x20\x74\x72\171\151\156\x67\40\x74\157\40\163\x65\164\x20\x61\144\x64\x72\x65\163\163\72\40{$ib->getMessage()}");
        }
        hd:
        o3:
        Bp:
        return $KA;
    }

Function Calls

None

Variables

None

Stats

MD5 5b27baa51a9ece48a98ff7c2a0e4305a
Eval Count 0
Decode Time 53 ms