Browse Source

Correctif

refactoring
Guillaume Bourgeois 1 year ago
parent
commit
dd66dba423
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      producer/controllers/OrderController.php

+ 5
- 4
producer/controllers/OrderController.php View File

@@ -746,10 +746,11 @@ class OrderController extends ProducerBaseController
$producerManager = $this->getProducerManager();

$user = GlobalParam::getCurrentUser();
$userProducer = $userProducerManager->findOneUserProducer($user, $producer);

if ($user && !$userProducer) {
$userProducer = $producerManager->addUser($user, $producer);
if($user) {
$userProducer = $userProducerManager->findOneUserProducer($user, $producer);
if (!$userProducer) {
$userProducer = $producerManager->addUser($user, $producer);
}
}

$jsonUser = false;

Loading…
Cancel
Save