Skip to content

Commit

Permalink
Merge pull request #19517 from seamuslee001/fix_user_load_deprecation
Browse files Browse the repository at this point in the history
Override the DrupalBase getUserObject function with a Drupal8/9 compa…
  • Loading branch information
eileenmcnaughton authored Feb 3, 2021
2 parents fdc8f59 + 578c81f commit 4ccc62d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions CRM/Utils/System/Drupal8.php
Original file line number Diff line number Diff line change
Expand Up @@ -847,4 +847,15 @@ public function sessionStart() {
}
}

/**
* Load the user object.
*
* @param int $userID
*
* @return object
*/
public function getUserObject($userID) {
return \Drupal::entityTypeManager()->getStorage('user')->load($userID);
}

}

0 comments on commit 4ccc62d

Please sign in to comment.