12-06-2016, 10:10 AM
Workflow custom functions are executed immediately on the save event and at that moment the $current_user variable contains the user launching the save. Although I think the code you have is correct and should work correctly because the session variable must also contain the current user id, you can use the $current_user object.
$current_user->id
and even just the session variable directly, there is no need to go through the trouble of creating the user object and the extra database queries
$params = array($_SESSION['authenticated_user_id'], $invoice_crm_id);
I'd say it will work.
$current_user->id
and even just the session variable directly, there is no need to go through the trouble of creating the user object and the extra database queries
$params = array($_SESSION['authenticated_user_id'], $invoice_crm_id);
I'd say it will work.
Joe
TSolucio
TSolucio