fiw typo in schema model
This commit is contained in:
@@ -55,6 +55,7 @@ class Customer implements EventSubscriberInterface
|
|||||||
$data = $form->getData();
|
$data = $form->getData();
|
||||||
$customer = new CustomerModel();
|
$customer = new CustomerModel();
|
||||||
try {
|
try {
|
||||||
|
\Thelia\Log\Tlog::getInstance()->debug($data);
|
||||||
$customer->createOrUpdate(
|
$customer->createOrUpdate(
|
||||||
$data["title"],
|
$data["title"],
|
||||||
$data["firstname"],
|
$data["firstname"],
|
||||||
|
|||||||
@@ -117,12 +117,14 @@ class CustomerCreation extends BaseForm
|
|||||||
))
|
))
|
||||||
->add("password", "password", array(
|
->add("password", "password", array(
|
||||||
"constraints" => array(
|
"constraints" => array(
|
||||||
|
new Constraints\NotBlank(),
|
||||||
new Constraints\Length(array("min" => ConfigQuery::read("password.length", 4)))
|
new Constraints\Length(array("min" => ConfigQuery::read("password.length", 4)))
|
||||||
),
|
),
|
||||||
"label" => "password"
|
"label" => "password"
|
||||||
))
|
))
|
||||||
->add("password_confirm", "password", array(
|
->add("password_confirm", "password", array(
|
||||||
"constraints" => array(
|
"constraints" => array(
|
||||||
|
new Constraints\NotBlank(),
|
||||||
new Constraints\Length(array("min" => ConfigQuery::read("password.length", 4))),
|
new Constraints\Length(array("min" => ConfigQuery::read("password.length", 4))),
|
||||||
new Constraints\Callback(array("methods" => array(
|
new Constraints\Callback(array("methods" => array(
|
||||||
array($this, "verifyPasswordField")
|
array($this, "verifyPasswordField")
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ class Customer extends BaseCustomer
|
|||||||
|
|
||||||
public function setPassword($password)
|
public function setPassword($password)
|
||||||
{
|
{
|
||||||
|
\Thelia\Log\Tlog::getInstance()->debug($password);
|
||||||
if ($this->isNew() && ($password === null || trim($password) == "")) {
|
if ($this->isNew() && ($password === null || trim($password) == "")) {
|
||||||
throw new InvalidArgumentException("customer password is mandatory on creation");
|
throw new InvalidArgumentException("customer password is mandatory on creation");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -477,8 +477,8 @@ CREATE TABLE `customer`
|
|||||||
`updated_at` DATETIME,
|
`updated_at` DATETIME,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE INDEX `ref_UNIQUE` (`ref`),
|
UNIQUE INDEX `ref_UNIQUE` (`ref`),
|
||||||
INDEX `idx_ customer_customer_title_id` (`customer_title_id`),
|
INDEX `idx_customer_customer_title_id` (`customer_title_id`),
|
||||||
CONSTRAINT `fk_ customer_customer_title_id`
|
CONSTRAINT `fk_customer_customer_title_id`
|
||||||
FOREIGN KEY (`customer_title_id`)
|
FOREIGN KEY (`customer_title_id`)
|
||||||
REFERENCES `customer_title` (`id`)
|
REFERENCES `customer_title` (`id`)
|
||||||
ON UPDATE RESTRICT
|
ON UPDATE RESTRICT
|
||||||
|
|||||||
@@ -349,7 +349,7 @@
|
|||||||
<column name="lang" size="10" type="VARCHAR" />
|
<column name="lang" size="10" type="VARCHAR" />
|
||||||
<column name="sponsor" size="50" type="VARCHAR" />
|
<column name="sponsor" size="50" type="VARCHAR" />
|
||||||
<column name="discount" type="FLOAT" />
|
<column name="discount" type="FLOAT" />
|
||||||
<foreign-key foreignTable="customer_title" name="fk_ customer_customer_title_id" onDelete="SET NULL" onUpdate="RESTRICT">
|
<foreign-key foreignTable="customer_title" name="fk_customer_customer_title_id" onDelete="SET NULL" onUpdate="RESTRICT">
|
||||||
<reference foreign="id" local="customer_title_id" />
|
<reference foreign="id" local="customer_title_id" />
|
||||||
</foreign-key>
|
</foreign-key>
|
||||||
<unique name="ref_UNIQUE">
|
<unique name="ref_UNIQUE">
|
||||||
|
|||||||
Reference in New Issue
Block a user