Browse Source

laboiteapain => opendistrib

refactoring
Guillaume Bourgeois 5 years ago
parent
commit
d34fce0204
4 changed files with 5 additions and 5 deletions
  1. +1
    -1
      backend/config/params.php
  2. +2
    -2
      backend/controllers/CronController.php
  3. +1
    -1
      backend/controllers/UserController.php
  4. +1
    -1
      backend/models/MailForm.php

+ 1
- 1
backend/config/params.php View File

*/ */


return [ return [
'adminEmail' => 'contact@laboiteapain.net',
'adminEmail' => 'contact@opendistrib.net',
]; ];

+ 2
- 2
backend/controllers/CronController.php View File

$arrayLastnameschecked = []; $arrayLastnameschecked = [];


$users = User::searchAll([ $users = User::searchAll([
'user_etablissement.id_etablissement' => 1
'user_producer.id_producer' => 1
]) ; ]) ;


foreach ($users as $u) { foreach ($users as $u) {
if ($u->email != 'boulanger@laboiteapain.net') {
if ($u->email != 'producer@opendistrib.net') {
do { do {
$indexLastname = rand(0, count($arrayLastnames) - 1); $indexLastname = rand(0, count($arrayLastnames) - 1);
$indexName = rand(0, count($arrayNames) - 1); $indexName = rand(0, count($arrayNames) - 1);

+ 1
- 1
backend/controllers/UserController.php View File

$model->generateAuthKey(); $model->generateAuthKey();
$model->username = $model->email; $model->username = $model->email;
if (!strlen($model->email)) { if (!strlen($model->email)) {
$model->username = 'inconnu@laboiteapain.net';
$model->username = 'inconnu@opendistrib.net';
} }
$model->save(); $model->save();

+ 1
- 1
backend/models/MailForm.php View File

foreach($usersArray as $user) { foreach($usersArray as $user) {
$body['Messages'][] = [ $body['Messages'][] = [
'From' => [ 'From' => [
'Email' => $producer->slug.'@laboiteapain.net',
'Email' => $producer->slug.'@opendistrib.net',
'Name' => $producer->name 'Name' => $producer->name
], ],
'To' => [ 'To' => [

Loading…
Cancel
Save