Skip to content

Commit

Permalink
Override the DrupalBase getUserObject function with a Drupal8/9 compa…
Browse files Browse the repository at this point in the history
…tible version
  • Loading branch information
seamuslee001 committed Feb 3, 2021
1 parent 6e53dc3 commit 578c81f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions CRM/Utils/System/Drupal8.php
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 578c81f

Please sign in to comment.