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 eda7a01
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions CRM/Utils/System/Drupal8.php
Expand Up @@ -847,4 +847,16 @@ public function sessionStart() {
}
}


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

}

0 comments on commit eda7a01

Please sign in to comment.