Set ufID and userID in the session when bootstrapping for a REST call
authorDavid Knoll <david@davidknoll.me.uk>
Sun, 11 Oct 2015 15:45:20 +0000 (16:45 +0100)
committerDavid Knoll <david@davidknoll.me.uk>
Sun, 11 Oct 2015 15:45:20 +0000 (16:45 +0100)
CRM/Utils/REST.php

index bb82f5c4400ae56a5f514e4f3fc7d37fcdad3a2f..ca96341cf59d5d71bdcbee2f86693371b07c689a 100644 (file)
@@ -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 {