From 5d0eb86b4b271f5a27eb821c585096e563b9d3d4 Mon Sep 17 00:00:00 2001 From: Brian Shaughnessy Date: Wed, 13 Mar 2013 14:14:07 -0400 Subject: [PATCH] CRM-11203 move setUserSession from Drupal to Base so we allow optional override on per CMS basis --- CRM/Utils/System/Base.php | 13 +++++++++++++ CRM/Utils/System/Drupal.php | 14 -------------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/CRM/Utils/System/Base.php b/CRM/Utils/System/Base.php index e100e5e014..e6b0a8ef31 100644 --- a/CRM/Utils/System/Base.php +++ b/CRM/Utils/System/Base.php @@ -100,5 +100,18 @@ abstract class CRM_Utils_System_Base { */ public abstract function getLoginURL($destination = ''); + /** + * Set a init session with user object + * + * @param array $data array with user specific data + * + * @access public + */ + function setUserSession($data) { + list($userID, $ufID) = $data; + $session = CRM_Core_Session::singleton(); + $session->set('ufID', $ufID); + $session->set('userID', $userID); + } } diff --git a/CRM/Utils/System/Drupal.php b/CRM/Utils/System/Drupal.php index 2afae9083b..44adea35fb 100644 --- a/CRM/Utils/System/Drupal.php +++ b/CRM/Utils/System/Drupal.php @@ -1024,18 +1024,4 @@ AND u.status = 1 og_ungroup($ogID, 'user', user_load($drupalID)); } } - - /** - * Set a init session with user object - * - * @param array $data array with user specific data - * - * @access public - */ - function setUserSession($data) { - list($userID, $ufID) = $data; - $session = CRM_Core_Session::singleton(); - $session->set('ufID', $ufID); - $session->set('userID', $userID); - } } -- 2.25.1