Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getValidateEmailQuery example
/** * Validates the inserted email address */
public
function
validateEmailAction
(
)
{
Shopware
(
)
->
Front
(
)
->
Plugins
(
)
->
ViewRenderer
(
)
->
setNoRender
(
)
;
$mail
=
$this
->
Request
(
)
->
get
(
'value'
)
;
$query
=
$this
->
getRepository
(
)
->
getValidateEmailQuery
(
$mail
,
$this
->
Request
(
)
->
get
(
'param'
)
,
$this
->
Request
(
)
->
get
(
'subshopId'
)
)
;
$customer
=
$query
->
getArrayResult
(
)
;
/** @var EmailValidatorInterface $emailValidator */
$emailValidator
=
$this
->container->
get
(
EmailValidator::
class
)
;
if
(
empty
(
$customer
)
&&
$emailValidator
->
isValid
(
$mail
)
)
{