On the user profile edit page I can do something like this in my theme's template.php file to hide a field:

function MYTHEME_form_user_profile_form_alter(&$form,$form_state,$form_id){
//remove unwanted fields from the form (default value is still saved)
  $form['timezone']['#access'] = FALSE;

On the profile view page, I am trying to do a similar thing. I want to hide:

Member for 3 months 4 weeks

So I looked up the api function and it's hook_user_view

Based on this I try:

function MYTHEME_user_view($items) {
$items['member_for']['#access'] = FALSE;

... however, this does not work after I clear the cache. I'd also like to avoid hiding this using CSS display:none.

1 Answer 1


You do not need to use any preprocess functions tbh :> its pretty simple Go to Home » Administration » Configuration » People » Account settings » Manage Display , History -> Format chose hidden.

  • Perfect, thanks! I actually have never used that page before, never had a need to until now. :) Commented Dec 28, 2012 at 0:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.