From 578c81f9d05d8f72ac16d6228a64eb904dbc762d Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Thu, 4 Feb 2021 07:41:07 +1100 Subject: [PATCH] Override the DrupalBase getUserObject function with a Drupal8/9 compatible version --- CRM/Utils/System/Drupal8.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CRM/Utils/System/Drupal8.php b/CRM/Utils/System/Drupal8.php index deb80cb60e..a7bb1aaede 100644 --- a/CRM/Utils/System/Drupal8.php +++ b/CRM/Utils/System/Drupal8.php @@ -847,4 +847,15 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase { } } + /** + * Load the user object. + * + * @param int $userID + * + * @return object + */ + public function getUserObject($userID) { + return \Drupal::entityTypeManager()->getStorage('user')->load($userID); + } + } -- 2.25.1