Skip to content
Snippets Groups Projects
Unverified Commit 72c28dd4 authored by Seamus Lee's avatar Seamus Lee Committed by GitHub
Browse files

Merge pull request #20479 from demeritcowboy/userload

#2636 - Authx - Undefined function in drupal 9 
parents 8d4d5423 6857c2f6
Branches
Tags
No related merge requests found
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment