From 8f407be0789b5aaefa7b616dbff73734db63738b Mon Sep 17 00:00:00 2001 From: Aidan Saunders Date: Mon, 25 Mar 2019 17:48:34 +0000 Subject: [PATCH] Fix bug preventing cv using '--user' See https://lab.civicrm.org/dev/joomla/issues/6 --- CRM/Utils/System/Joomla.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CRM/Utils/System/Joomla.php b/CRM/Utils/System/Joomla.php index 533331b8837a..b80673eb3756 100644 --- a/CRM/Utils/System/Joomla.php +++ b/CRM/Utils/System/Joomla.php @@ -454,6 +454,12 @@ public function loadUser($username, $password = NULL) { $instance->login($params); } + // Save details in Joomla session + $user = JFactory::getUser($uid); + $jsession = JFactory::getSession(); + $jsession->set('user', $user); + + // Save details in Civi session $session = CRM_Core_Session::singleton(); $session->set('ufID', $uid); $session->set('userID', $contactID);