How do you programmatically get the current user's status? I'm trying to get the currently logged-in user's status (active or blocked) in template_preprocess_user. I tried the following with no luck.
function MYTHEME_preprocess_user(&amp;$variables) {
  $user = $variables['user'];
  $variables['status'] = $user-&gt;status();
}

function MYTHEME_preprocess_user(&amp;$variables) {
  $user = $variables['user'];
  $variables['status'] = $user-&gt;getStatus();
}
Assuming this is Drupal 8, try $user-&gt;isBlocked().
If this is Drupal 7, you probably just need to call user_load($uid) first in order to get a fully-loaded user object before checking the $user-&gt;status. Or try user_is_blocked($name).