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(&$variables) {
$user = $variables['user'];
$variables['status'] = $user->status();
}
function MYTHEME_preprocess_user(&$variables) {
$user = $variables['user'];
$variables['status'] = $user->getStatus();
}