Fix: missing User object with API REST
This commit is contained in:
parent
79af10fc83
commit
97bf6fff7f
@ -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
|
||||
|
||||
@ -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)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user