From: demeritcowboy Date: Wed, 2 Jun 2021 12:06:19 +0000 (-0400) Subject: deprecated function X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=6857c2f654e13426e1a183ded4932e4c6a63a4ee;p=civicrm-core.git deprecated function --- diff --git a/ext/authx/Civi/Authx/Drupal8.php b/ext/authx/Civi/Authx/Drupal8.php index 34debea936..bb817e7b45 100644 --- a/ext/authx/Civi/Authx/Drupal8.php +++ b/ext/authx/Civi/Authx/Drupal8.php @@ -26,7 +26,7 @@ class Drupal8 implements AuthxInterface { * @inheritDoc */ public function loginSession($userId) { - $user = user_load($userId); + $user = \Drupal\user\Entity\User::load($userId); user_login_finalize($user); } @@ -41,7 +41,7 @@ class Drupal8 implements AuthxInterface { * @inheritDoc */ public function loginStateless($userId) { - $user = user_load($userId); + $user = \Drupal\user\Entity\User::load($userId); // In theory, we could use either account_switcher->switchTo() or current_user->setAccount(). // switchTo() sounds more conscientious, but setAccount() might be a more accurate rendition // of "stateless login". At time of writing, there doesn't seem to be a compelling difference.