You are a developer and looking for Shopware projects?
Apply Now!
isUserLoggedIn example
return
false;
}
private
function
isUserLoggedIn
(
)
: bool
{
return
!
empty
(
$this
->
get
(
'session'
)
->
offsetGet
(
'sUserId'
)
)
;
}
private
function
shouldRedirectToAccount
(
)
: bool
{
if
(
!
$this
->
isUserLoggedIn
(
)
)
{
return
false;
}
return
$this
->
Request
(
)
->
getParam
(
'sValidation'
)
|| !
Shopware
(
)
->
Modules
(
)
->
Basket
(
)
->
sCountBasket
(
)
;
}
private
function
shouldRedirectToCheckout
(
)
: bool
{
return
$this
->
isUserLoggedIn
(
)
;
}