drupal 8 load user account code example
Example: drupal 8 user_load
function user_load($uid, $reset = FALSE) {
if ($reset) {
\Drupal::entityManager()
->getStorage('user')
->resetCache(array(
$uid,
));
}
return User::load($uid);
}