change compatibility for propel2
This commit is contained in:
@@ -55,7 +55,6 @@ class Customer implements EventSubscriberInterface
|
||||
$data = $form->getData();
|
||||
$customer = new CustomerModel();
|
||||
try {
|
||||
\Thelia\Log\Tlog::getInstance()->debug($data);
|
||||
$customer->createOrUpdate(
|
||||
$data["title"],
|
||||
$data["firstname"],
|
||||
|
||||
@@ -156,7 +156,8 @@ class CustomerCreation extends BaseForm
|
||||
|
||||
public function verifyExistingEmail($value, ExecutionContextInterface $context)
|
||||
{
|
||||
if (CustomerQuery::create()->filterByEmail($value)->exists()) {
|
||||
$customer = CustomerQuery::create()->findOneByEmail($value);
|
||||
if ($customer) {
|
||||
$context->addViolation("This email already exists");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Thelia\Core\Event\CustomRefEvent;
|
||||
use Thelia\Core\Event\TheliaEvents;
|
||||
use Propel\Runtime\Connection\ConnectionInterface;
|
||||
|
||||
class Customer extends BaseCustomer {
|
||||
/**
|
||||
@@ -61,7 +62,7 @@ class Customer extends BaseCustomer {
|
||||
|
||||
}
|
||||
|
||||
public function preInsert(\PropelPDO $con = null)
|
||||
public function preInsert(ConnectionInterface $con = null)
|
||||
{
|
||||
$customerRef = new CustomRefEvent($this);
|
||||
if (!is_null($this->dispatcher)) {
|
||||
|
||||
Reference in New Issue
Block a user