Answers for "drupal 8 user_load"

PHP
0

drupal 8 user_load

function user_load($uid, $reset = FALSE) {
  if ($reset) {
    \Drupal::entityManager()
      ->getStorage('user')
      ->resetCache(array(
      $uid,
    ));
  }
  return User::load($uid);
}
Posted by: Guest on May-11-2020

Browse Popular Code Answers by Language