From 6857c2f654e13426e1a183ded4932e4c6a63a4ee Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Wed, 2 Jun 2021 08:06:19 -0400 Subject: [PATCH] deprecated function --- ext/authx/Civi/Authx/Drupal8.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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. -- 2.25.1