소스 검색

Correctifs migration

feature/souke
Guillaume Bourgeois 1 년 전
부모
커밋
62ee13672b
4개의 변경된 파일16개의 추가작업 그리고 20개의 파일을 삭제
  1. +6
    -10
      common/logic/Producer/Producer/Service/ProducerManager.php
  2. +3
    -3
      console/migrations/m190205_160337_produit_don_distrib.php
  3. +6
    -6
      frontend/forms/PasswordResetRequestForm.php
  4. +1
    -1
      frontend/forms/SignupForm.php

+ 6
- 10
common/logic/Producer/Producer/Service/ProducerManager.php 파일 보기

@@ -10,16 +10,12 @@ class ProducerManager extends AbstractService implements ManagerInterface
{
public function sendEmailNewProducer(Producer $producer): void
{
\Yii::$app->mailer->compose(
\Yii::$app->mailerService->sendAdmin(
'Nouveau producteur',
'new-producer',
[
'html' => 'new-producer-html',
'text' => 'new-producer-text'
], [
'producer' => $producer
])
->setTo(\Yii::$app->parameterBag->get('adminEmail'))
->setFrom([\Yii::$app->parameterBag->get('adminEmail') => 'Opendistrib'])
->setSubject('[Opendistrib] Nouveau producteur')
->send();
'producer' => $producer
]
);
}
}

+ 3
- 3
console/migrations/m190205_160337_produit_don_distrib.php 파일 보기

@@ -5,7 +5,7 @@ use yii\db\Migration;
class m190205_160337_produit_don_distrib extends Migration {

public function up() {
$this->insert('product', [
/*$this->insert('product', [
'name' => 'Don',
'description' => 'Don à la plateforme distrib',
'recipe' => '',
@@ -24,10 +24,10 @@ class m190205_160337_produit_don_distrib extends Migration {
'id_producer' => 0,
'sale_mode' => 'unit',
'order' => 1000,
]) ;
]);*/
}

public function down() {
$this->delete('product', 'name = \'Don\' AND id_producer = 0') ;
//$this->delete('product', 'name = \'Don\' AND id_producer = 0') ;
}
}

+ 6
- 6
frontend/forms/PasswordResetRequestForm.php 파일 보기

@@ -85,12 +85,12 @@ class PasswordResetRequestForm extends Model
}

if ($user->save()) {
return \Yii::$app->mailer->compose(['html' => 'passwordResetToken-html', 'text' => 'passwordResetToken-text'], ['user' => $user])
->setFrom(['contact@opendistrib.net' => 'distrib'])
->setTo($this->email)
->setSubject('[Opendistrib] Mot de passe oublié')
->send();
return \Yii::$app->mailerService->sendFromSite(
'Mot de passe oublié',
'passwordResetToken',
['user' => $user],
$this->email
);
}
}


+ 1
- 1
frontend/forms/SignupForm.php 파일 보기

@@ -239,7 +239,7 @@ class SignupForm extends Model

if ($this->validate()) {

$user = $userModule->instanciateUser();
$user = $userModule->instanciateUser(User::TYPE_INDIVIDUAL);
$this->populateUser($user);

if ($this->isProducer()) {

Loading…
취소
저장