Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php namespace MiniOrange\SP\Controller\Actions; use Magento\Framework\UrlInterfa..
Decoded Output download
<?php
namespace MiniOrange\SP\Controller\Actions;
use Magento\Framework\UrlInterface;
use Magento\Framework\DataObject;
use Magento\Backend\Model\Auth\Session;
class CustomerLoginAction extends BaseAction
{
protected $relayState;
protected $user;
protected $customerSession;
protected $responseFactory;
protected $customerId;
protected $accountId;
protected $request;
public function __construct(\Magento\Backend\App\Action\Context $gR, \MiniOrange\SP\Helper\SPUtility $hE, \Magento\Customer\Model\Session $gB, \Magento\Framework\App\ResponseFactory $jb, \Magento\Store\Model\StoreManagerInterface $tP, \Magento\Framework\Controller\ResultFactory $fN, \Magento\Framework\App\RequestInterface $K2)
{
$this->customerSession = $gB;
$this->responseFactory = $jb;
$this->request = $K2;
parent::__construct($gR, $hE, $tP, $fN, $jb);
}
public function execute()
{
$this->spUtility->log_debug("CustomerLoginAction : execute: relaystate: " . $this->relayState);
$this->customerSession->setCustomerAsLoggedIn($this->user);
$B2 = $this->spUtility->getCustomer($this->customerId);
$qm = $this->spUtility->getStoreById($B2->getStoreId());
$rJ = new DataObject(["customer_id" => $this->customerId]);
$bu = $this->request->getParams();
if (!isset($bu["parent_account_id"])) {
goto v8;
}
$this->customerSession->setIsAdmin(true);
$this->_eventManager->dispatch("customer_save_after", ["customer" => $bu]);
v8:
$N0 = $this->customerSession->isLoggedIn() && $this->customerSession->getIsAdmin();
$this->_eventManager->dispatch("sp_customer_login", ["customer_data" => $rJ]);
$this->spUtility->log_debug("CustomerLoginAction : execute(): Event Dispatched");
$eT = $this->spUtility->isBlank($this->relayState) ? $qm->getBaseUrl() : $this->relayState;
$this->spUtility->log_debug("CustomerLoginAction : execute: redirectUrl. " . $eT);
$this->spUtility->messageManager->addSuccess("You are logged in Successfully.");
$this->responseFactory->create()->setRedirect($eT)->sendResponse();
exit;
}
public function setUser($user)
{
$this->user = $user;
$this->spUtility->log_debug("setting User: ");
return $this;
}
public function setCustomerId($qD)
{
$this->customerId = $qD;
$this->spUtility->log_debug("setting customerId: " . $qD);
return $this;
}
public function setRelayState($A0)
{
$this->relayState = $A0;
return $this;
}
public function setAxCompanyId($vd)
{
$this->accountId = $vd;
return $this;
}
public function setScope($fp)
{
$this->isAdminScope = $fp;
return $this;
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace MiniOrange\SP\Controller\Actions;
use Magento\Framework\UrlInterface;
use Magento\Framework\DataObject;
use Magento\Backend\Model\Auth\Session;
class CustomerLoginAction extends BaseAction
{
protected $relayState;
protected $user;
protected $customerSession;
protected $responseFactory;
protected $customerId;
protected $accountId;
protected $request;
public function __construct(\Magento\Backend\App\Action\Context $gR, \MiniOrange\SP\Helper\SPUtility $hE, \Magento\Customer\Model\Session $gB, \Magento\Framework\App\ResponseFactory $jb, \Magento\Store\Model\StoreManagerInterface $tP, \Magento\Framework\Controller\ResultFactory $fN, \Magento\Framework\App\RequestInterface $K2)
{
$this->customerSession = $gB;
$this->responseFactory = $jb;
$this->request = $K2;
parent::__construct($gR, $hE, $tP, $fN, $jb);
}
public function execute()
{
$this->spUtility->log_debug("\x43\165\x73\164\157\x6d\145\x72\x4c\x6f\147\x69\x6e\101\143\164\x69\x6f\x6e\40\72\40\145\170\x65\x63\165\164\145\72\40\x72\x65\154\x61\x79\163\x74\x61\164\145\72\40" . $this->relayState);
$this->customerSession->setCustomerAsLoggedIn($this->user);
$B2 = $this->spUtility->getCustomer($this->customerId);
$qm = $this->spUtility->getStoreById($B2->getStoreId());
$rJ = new DataObject(["\x63\x75\163\x74\x6f\x6d\x65\162\137\x69\x64" => $this->customerId]);
$bu = $this->request->getParams();
if (!isset($bu["\x70\141\162\x65\156\x74\137\141\x63\x63\157\165\156\x74\137\x69\144"])) {
goto v8;
}
$this->customerSession->setIsAdmin(true);
$this->_eventManager->dispatch("\x63\165\163\x74\x6f\155\145\162\137\163\x61\x76\145\x5f\x61\146\164\145\162", ["\143\165\x73\x74\x6f\155\145\162" => $bu]);
v8:
$N0 = $this->customerSession->isLoggedIn() && $this->customerSession->getIsAdmin();
$this->_eventManager->dispatch("\x73\x70\137\x63\165\163\x74\157\155\145\x72\x5f\x6c\157\x67\x69\x6e", ["\143\165\x73\x74\157\155\145\x72\137\x64\x61\164\x61" => $rJ]);
$this->spUtility->log_debug("\x43\x75\x73\164\157\x6d\x65\162\x4c\157\147\151\156\101\143\x74\x69\x6f\x6e\x20\x3a\x20\145\170\145\143\x75\164\x65\50\x29\x3a\40\40\x45\x76\x65\156\164\40\x44\151\x73\x70\141\x74\143\x68\x65\x64");
$eT = $this->spUtility->isBlank($this->relayState) ? $qm->getBaseUrl() : $this->relayState;
$this->spUtility->log_debug("\x43\x75\x73\x74\157\155\x65\x72\x4c\157\x67\151\x6e\101\x63\x74\151\157\156\x20\72\x20\145\x78\x65\x63\x75\x74\145\72\40\x72\145\144\151\x72\145\x63\164\x55\x72\154\x2e\x20" . $eT);
$this->spUtility->messageManager->addSuccess("\131\157\165\40\x61\162\145\40\x6c\x6f\147\147\x65\144\40\151\x6e\40\123\x75\x63\x63\x65\x73\163\x66\165\154\x6c\171\56");
$this->responseFactory->create()->setRedirect($eT)->sendResponse();
exit;
}
public function setUser($user)
{
$this->user = $user;
$this->spUtility->log_debug("\x73\145\x74\x74\x69\x6e\x67\x20\x55\163\145\162\x3a\x20");
return $this;
}
public function setCustomerId($qD)
{
$this->customerId = $qD;
$this->spUtility->log_debug("\163\x65\x74\x74\151\x6e\147\40\x63\165\163\x74\157\155\x65\162\x49\144\72\40" . $qD);
return $this;
}
public function setRelayState($A0)
{
$this->relayState = $A0;
return $this;
}
public function setAxCompanyId($vd)
{
$this->accountId = $vd;
return $this;
}
public function setScope($fp)
{
$this->isAdminScope = $fp;
return $this;
}
}
Function Calls
None |
Stats
MD5 | 26a638f2a27e0c622a64d445e6fab88b |
Eval Count | 0 |
Decode Time | 42 ms |