Skip to content

Commit 83db16c

Browse files
committed
escape underscore in email address - resolves #225
1 parent d8f8cba commit 83db16c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/CustomerProvider/DefaultCustomerProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ public function getActiveCustomerByEmail($email)
211211
$list = $this->getList();
212212
$list->setUnpublished(false);
213213
$this->addActiveCondition($list);
214-
$list->addConditionParam('trim(email) like ?', [trim($email)]);
214+
$list->addConditionParam('trim(email) like ?', [$list->escapeLike(trim($email))]);
215215

216216
if ($list->count() > 1) {
217217
throw new DuplicateCustomersFoundException(sprintf('multiple active and published customers with email %s found', $email));

0 commit comments

Comments
 (0)