Fix: missing User object with API REST

This commit is contained in:
Regis Houssin 2018-04-10 08:07:23 +02:00
parent 79af10fc83
commit 97bf6fff7f
2 changed files with 5 additions and 2 deletions

View File

@ -313,12 +313,15 @@ class BlockedLog
* @param Object $object object to store
* @param string $action action
* @param string $amounts amounts
* @param User $fuser User object (forced)
* @return int >0 if OK, <0 if KO
*/
public function setObjectData(&$object, $action, $amounts)
public function setObjectData(&$object, $action, $amounts, $fuser = null)
{
global $langs, $user, $mysoc;
if (is_object($fuser)) $user = $fuser;
// Generic fields
// action

View File

@ -111,7 +111,7 @@ class InterfaceActionsBlockedLog extends DolibarrTriggers
return 0; // not implemented action log
}
$result = $b->setObjectData($object, $action, $amounts); // Set field date_object, ref_object, fk_object, element, object_data
$result = $b->setObjectData($object, $action, $amounts, $user); // Set field date_object, ref_object, fk_object, element, object_data
if ($result < 0)
{