Merge pull request #8530 from hregis/7.0_bug3
FIX missing User object with API REST
This commit is contained in:
commit
ba526dd7f2
@ -313,12 +313,15 @@ class BlockedLog
|
|||||||
* @param Object $object object to store
|
* @param Object $object object to store
|
||||||
* @param string $action action
|
* @param string $action action
|
||||||
* @param string $amounts amounts
|
* @param string $amounts amounts
|
||||||
|
* @param User $fuser User object (forced)
|
||||||
* @return int >0 if OK, <0 if KO
|
* @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;
|
global $langs, $user, $mysoc;
|
||||||
|
|
||||||
|
if (is_object($fuser)) $user = $fuser;
|
||||||
|
|
||||||
// Generic fields
|
// Generic fields
|
||||||
|
|
||||||
// action
|
// action
|
||||||
|
|||||||
@ -111,7 +111,7 @@ class InterfaceActionsBlockedLog extends DolibarrTriggers
|
|||||||
return 0; // not implemented action log
|
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)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user