Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
createHash example
public
function
viewAction
(
)
{
$hash
= null;
if
(
$this
->
Request
(
)
->
getParam
(
'id'
)
)
{
$mailingID
=
(int)
$this
->
Request
(
)
->
getParam
(
'id'
)
;
if
(
!
Shopware
(
)
->
Container
(
)
->
get
(
'auth'
)
->
hasIdentity
(
)
)
{
$hash
=
$this
->
createHash
(
$mailingID
)
;
if
(
$hash
!==
$this
->
Request
(
)
->
getParam
(
'hash'
)
)
{
return
;
}
}
}
else
{
$mailingID
=
(int)
$this
->
Request
(
)
->
getParam
(
'campaign'
)
;
$mailaddressID
=
(int)
$this
->
Request
(
)
->
getParam
(
'mailaddress'
)
;
$hash
=
$this
->
createHash
(
$mailaddressID
,
$mailingID
)
;
if
(
$hash
!==
$this
->
Request
(
)
->
getParam
(
'hash'
)
)
{
return
;
}
}