From 35f52ba93de1d2726ebeef726b4efad6db1c203f Mon Sep 17 00:00:00 2001 From: David Knoll Date: Sun, 26 Jun 2016 23:13:23 +0100 Subject: [PATCH] CRM-19012 set @civicrm_user_id in the DB for REST calls --- CRM/Utils/REST.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CRM/Utils/REST.php b/CRM/Utils/REST.php index 20a7657c18..6cdb5fe1e1 100644 --- a/CRM/Utils/REST.php +++ b/CRM/Utils/REST.php @@ -712,6 +712,9 @@ class CRM_Utils_REST { $session = CRM_Core_Session::singleton(); $session->set('ufID', $uid); $session->set('userID', $contact_id); + CRM_Core_DAO::executeQuery('SET @civicrm_user_id = %1', + array(1 => array($contact_id, 'Integer')) + ); return NULL; } else { -- 2.25.1