Skip to content
Snippets Groups Projects
Commit 018c0da5 authored by Florian Azizian's avatar Florian Azizian
Browse files

FEAT #1944 change how to fill destination and initiator (useful for...

FEAT #1944 change how to fill destination and initiator (useful for checkUserMail function in maarchCapture)
parent 05b8a3bc
No related branches found
No related tags found
No related merge requests found
......@@ -284,12 +284,6 @@ class resources_controler
if (strtoupper($data[$i]['column']) == strtoupper('type_id')) {
$typeIdFound = true;
}
if (strtoupper($data[$i]['column']) == strtoupper('destination')) {
$destinationFound = true;
}
if (strtoupper($data[$i]['column']) == strtoupper('initiator')) {
$initiatorFound = true;
}
if (strtoupper($data[$i]['column']) == strtoupper('custom_t10')) {
require_once 'core/class/class_db.php';
$dbQuery = new dbquery();
......@@ -363,26 +357,48 @@ class resources_controler
)
);
}
if ($userPrimaryEntity && !$destinationFound) {
array_push(
$data,
array(
'column' => 'destination',
'value' => $userEntity,
'type' => 'string',
)
);
if ($userPrimaryEntity) {
for ($i=0;$i<count($data);$i++) {
if (strtoupper($data[$i]['column']) == strtoupper('destination')) {
if ($data[$i]['value'] == "") {
$data[$i]['value'] = $userEntity;
}
$destinationFound = true;
break;
}
}
if (!$destinationFound) {
array_push(
$data,
array(
'column' => 'destination',
'value' => $userEntity,
'type' => 'string',
)
);
}
}
if ($userPrimaryEntity && !$initiatorFound) {
array_push(
$data,
array(
'column' => 'initiator',
'value' => $userEntity,
'type' => 'string',
)
);
}
if ($userPrimaryEntity) {
for ($i=0;$i<count($data);$i++) {
if (strtoupper($data[$i]['column']) == strtoupper('initiator')) {
if ($data[$i]['value'] == "") {
$data[$i]['value'] = $userEntity;
}
$initiatorFound = true;
break;
}
}
if (!$initiatorFound) {
array_push(
$data,
array(
'column' => 'initiator',
'value' => $userEntity,
'type' => 'string',
)
);
}
}
array_push(
$data,
array(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment