3

I know how to remove the user tab completely from the user menu with hooks.

I want to know where I can find the template file that render the items under this tab (or where I can edit what to show under this tab) as I want to hide some parts for all users).

I have tried Home » Administration » Configuration » People » Account settings. But it only changes items on the user account page NOT the edit tab.

1
  • install devel module then you get any field of users
    – Adi
    Feb 16, 2016 at 12:34

3 Answers 3

4

If you'd like to hide fields or properties from the user account edit form, you can create a custom module implementing either hook_form_alter() or hook_form_FORM_ID_alter(). The ID of the form in question is 'user_profile_form'.

3

I come from check how the page is created and for this Drupal use various function. So I think that the best for you is install the Theme developer module with the simplehtmldom API module (You must use simplehtml API version 7.x-1.12 if you want Theme Developer to function properly.)

Theme Developer relies on the Devel module as a dependency. Once enabled, you may click on any part of the page and a sexy popup display shows which theme function/template outputted the HTML, and what other files could have done so. Armed with this info, a themer may quickly and accurately override the presentation. Further, all the variables passed into the template/function are presented for review.

To learn how to use the module you can read (or watch) about the Theme developer module.

2

If the only challenge is to hide some account required fields on the register tab, you can also use field_permissions together with required_by_role.

Your Answer

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

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