diff --git a/src/app/action/controllers/ActionMethodController.php b/src/app/action/controllers/ActionMethodController.php index 79cba9b601830655e28746afa7c9b9176e954ea1..4b56bbcf77222ee359adefc2cbe89ecaecc0a1b6 100644 --- a/src/app/action/controllers/ActionMethodController.php +++ b/src/app/action/controllers/ActionMethodController.php @@ -944,13 +944,13 @@ class ActionMethodController public static function giveOpinionParallel(array $args) { - ValidatorModel::notEmpty($args, ['resId']); - ValidatorModel::intVal($args, ['resId']); + ValidatorModel::notEmpty($args, ['resId', 'userId']); + ValidatorModel::intVal($args, ['resId', 'userId']); $currentStep = ListInstanceModel::get([ 'select' => ['listinstance_id', 'item_id'], 'where' => ['res_id = ?', 'difflist_type = ?', 'item_id = ?', 'item_mode in (?)'], - 'data' => [$args['resId'], 'entity_id', $GLOBALS['id'], ['avis', 'avis_copy', 'avis_info']], + 'data' => [$args['resId'], 'entity_id', $args['userId'], ['avis', 'avis_copy', 'avis_info']], 'limit' => 1 ]); diff --git a/src/app/action/controllers/PreProcessActionController.php b/src/app/action/controllers/PreProcessActionController.php index 20ba7202904278e2e644c5994bd64e40db9bc4c8..fcf3f5ec44e4eacd703a878f52e09c4f5502477c 100755 --- a/src/app/action/controllers/PreProcessActionController.php +++ b/src/app/action/controllers/PreProcessActionController.php @@ -1430,7 +1430,7 @@ class PreProcessActionController $isInCircuit = ListInstanceModel::get([ 'select' => [1], 'where' => ['res_id = ?', 'difflist_type = ?', 'process_date is null', 'item_id = ?', 'item_mode = ?'], - 'data' => [$resId, 'entity_id', $GLOBALS['id'], 'avis'] + 'data' => [$resId, 'entity_id', $args['userId'], 'avis'] ]); if (empty($isInCircuit)) { $resourcesInformation['error'][] = ['alt_identifier' => $resource['alt_identifier'], 'res_id' => $resId, 'reason' => 'userNotInDiffusionList']; diff --git a/src/app/resource/controllers/ResourceListController.php b/src/app/resource/controllers/ResourceListController.php index 811e40c3560f1ee43a7caf55280601ed627e853b..5fe339e474d36362c3b16e60415a19438de2d667 100644 --- a/src/app/resource/controllers/ResourceListController.php +++ b/src/app/resource/controllers/ResourceListController.php @@ -505,7 +505,7 @@ class ResourceListController } if (!empty($method)) { - $methodResponse = ActionMethodController::$method(['resId' => $resId, 'data' => $body['data'], 'note' => $body['note'], 'action' => $action, 'resources' => $resourcesForAction]); + $methodResponse = ActionMethodController::$method(['resId' => $resId, 'data' => $body['data'], 'note' => $body['note'], 'action' => $action, 'resources' => $resourcesForAction, 'userId' => $aArgs['userId']]); if (!empty($methodResponse['errors'])) { if (empty($methodResponses['errors'])) {