
In Drupal, the user page is by default templated and composed depending on whatever module has been installed and enabled to show in the user page. With Drupal, there are always many flexible ways to do stuff and achieve what you need. While there was a module, Tab Tamer, for Drupal 7 specifically for customizing the tabs on the user profile page, with Drupal 8 onwards, to date, you may need to remove or hide these tabs thru any of the following:
Disable the module
Depending on the module and how and if it is rendered on the tab, you may simply need to disable the module. For instance, the "Activity" tab is being generated by the Activity Tracker module which comes with the Drupal core installer. Uninstalling this module will remove the tab. Similar instances for example with other modules like newsletter modules, etc. You need to check though if such modules are indeed needed for some functionality elsewhere, and if such module is a dependency of some other module.
Hooks and APIs
You may need to check out hook implementations, for instance the following:
- hook_menu_local_tasks_alter()
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Menu%21me... - hook_local_tasks_alter()
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Menu%21me...
Custom Module
You may also develop your own custom Drupal module to override the user page. Follow some suggested implementations from the community forums:
- https://www.drupal.org/forum/support/post-installation/2019-09-01/how-to...
- https://drupal.stackexchange.com/questions/102810/how-to-add-remove-tabs...
Other Customizations and Displays
For other advanced customizations overall for the user page profile, you may want to check out for instance:
- Display Field Copy module - this can boost your manage display customizations in /admin/config/people/accounts/display by letting you re-use existing fields twice or more if needed
- https://stackoverflow.com/questions/34835931/how-to-add-custom-html-on-u...
- https://drupal.stackexchange.com/questions/269881/how-can-i-create-a-cus...
Leave a Comment