Преглед изворни кода

Merge tag 'hotfix_1224' into develop

hotfix_1224
feature/souke
Guillaume Bourgeois пре 1 година
родитељ
комит
946d251c93
2 измењених фајлова са 3 додато и 1 уклоњено
  1. +1
    -0
      backend/controllers/UserController.php
  2. +2
    -1
      common/logic/User/User/Repository/UserRepository.php

+ 1
- 0
backend/controllers/UserController.php Прегледај датотеку

@@ -505,6 +505,7 @@ class UserController extends BackendController
'users_point_sale_has_order' => $usersPointSaleHasOrder,
'subscribers' => $sectionSubscribers,
'inactive' => $sectionInactiveUsers,
'newsletter' => true
])->all();

$usersArray = [];

+ 2
- 1
common/logic/User/User/Repository/UserRepository.php Прегледај датотеку

@@ -91,7 +91,8 @@ class UserRepository extends AbstractRepository
->from('user');

$active = (isset($params['inactive']) && $params['inactive']) ? 0 : 1;
$query->innerJoin('user_producer', 'user.id = user_producer.id_user AND user_producer.active = ' . $active . ' AND user_producer.newsletter = 1 AND user_producer.id_producer = :id_producer', [':id_producer' => $params['id_producer']]);
$filterNewsletter = (isset($params['newsletter']) && $params['newsletter']) ? 'AND user_producer.newsletter = 1' : '';
$query->innerJoin('user_producer', 'user.id = user_producer.id_user AND user_producer.active = ' . $active . ' '.$filterNewsletter.' AND user_producer.id_producer = :id_producer', [':id_producer' => $params['id_producer']]);

if (isset($params['id_point_sale']) && $params['id_point_sale']) {
$point_sale = PointSale::findOne(['id' => $params['id_point_sale']]);

Loading…
Откажи
Сачувај