From f320e5cd2fd5ec881b613d4afb9c4839839dcac3 Mon Sep 17 00:00:00 2001 From: David Knoll Date: Sun, 11 Oct 2015 16:45:20 +0100 Subject: [PATCH] Set ufID and userID in the session when bootstrapping for a REST call --- CRM/Utils/REST.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CRM/Utils/REST.php b/CRM/Utils/REST.php index bb82f5c440..ca96341cf5 100644 --- a/CRM/Utils/REST.php +++ b/CRM/Utils/REST.php @@ -707,8 +707,11 @@ class CRM_Utils_REST { } } - if ($uid) { + if ($uid && $contact_id) { CRM_Utils_System::loadBootStrap(array('uid' => $uid), TRUE, FALSE); + $session = CRM_Core_Session::singleton(); + $session->set('ufID', $uid); + $session->set('userID', $contact_id); return NULL; } else { -- 2.25.1