Merge pull request #8530 from hregis/7.0_bug3

FIX missing User object with API REST
This commit is contained in:
Laurent Destailleur 2018-04-11 13:11:27 +02:00 committed by GitHub
commit ba526dd7f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)
{