if ($shippingCountry === null
) { throw new RuntimeException('Invalid customer shipping address'
);
} /** @var Enlight_Components_Session_Namespace $session */
$session =
$this->
get('session'
);
$session->
offsetSet('sRegister',
$data['register'
]);
$session->
offsetSet('sOneTimeAccount', false
);
$session->
offsetSet('sRegisterFinished', true
);
$session->
offsetSet('sCountry',
$shippingCountry->
getId());
$session->
offsetSet('sArea',
$shippingCountry->
getArea() !== null ?
$shippingCountry->
getArea()->
getId() : 0
);
if ($customer->
getAccountMode() === Customer::ACCOUNT_MODE_FAST_LOGIN
) { $session->
offsetSet('sOneTimeAccount', true
);
} } private function loginCustomer(Customer
$customer): void
{ $this->front->
Request()->
setPost('email',
$customer->
getEmail());
$this->front->
Request()->
setPost('passwordMD5',
$customer->
getPassword());
Shopware()->
Modules()->
Admin()->
sLogin(true
);
}