public function KeyAuthTest::loadUser in Key auth 8
Load a user entity while bypassing the static cache.
Parameters
int $uid: The user entity ID.
Return value
\Drupa\user\UserInterface|null A user entity, if found, otherwise NULL.
1 call to KeyAuthTest::loadUser()
- KeyAuthTest::testUserKeyAuthForm in tests/src/ Functional/ KeyAuthTest.php 
- Test the user key auth form.
File
- tests/src/ Functional/ KeyAuthTest.php, line 344 
Class
- KeyAuthTest
- Tests for key authentication provider.
Namespace
Drupal\Tests\key_auth\FunctionalCode
public function loadUser($uid) {
  $this->userStorage
    ->resetCache([
    $uid,
  ]);
  return $this->userStorage
    ->load($uid);
}