How to get logged in user id
Summary
How to get logged in user id from custom processContent
Hi,
We are trying to populate a field ($workOrder->Resource) with the name of the last user who updated the object. But when we test it we noticed that it only works in the first time when the object is update, the following times it doesn't populate wich account have updated the field.
Can you help me identifying if there is anything wrong in the code?
public static function setResourceToWorkOrder($obj,$act){
if (RNCPM\ActionUpdate == $act){
$workOrder = RNCPHP\TOA\Work_Order::fetch($obj->ID);
$account = RNCPHP\Account::fetch($workOrder->UpdatedByAccount->ID);
Tagged:
0