Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
regenerateSessionId example
public
function
logout
(
)
{
if
(
$this
->config->
get
(
'migrateCartAfterLogin'
)
)
{
Shopware
(
)
->
Container
(
)
->
get
(
CartPersistServiceInterface::
class
)
->
prepare
(
)
;
}
if
(
$this
->config->
get
(
'clearBasketAfterLogout'
)
)
{
$this
->moduleManager->
Basket
(
)
->
sDeleteBasket
(
)
;
}
$this
->session->
clear
(
)
;
$this
->
regenerateSessionId
(
true
)
;
if
(
$this
->config->
get
(
'migrateCartAfterLogin'
)
)
{
Shopware
(
)
->
Container
(
)
->
get
(
CartPersistServiceInterface::
class
)
->
persist
(
)
;
}
$shop
=
Shopware
(
)
->
Shop
(
)
;
$this
->sSYSTEM->sUSERGROUP =
$shop
->
getCustomerGroup
(
)
->
getKey
(
)
;
$this
->sSYSTEM->sUSERGROUPDATA =
$shop
->
getCustomerGroup
(
)
->
toArray
(
)
;
$this
->sSYSTEM->sCurrency =
$shop
->
getCurrency
(
)
->
toArray
(
)
;