Taking control of your 'My Account' page

Nov 6, 2008 - Posted by: Jody Hamilton

Some modules add sections to your 'My Account' page. For example, the user module adds content like 'Member for: 4 days.' Blog module, profile module as well as many contributed modules add in their own content. Some modules provide a configuration option to decide if such content is shown, but many do not. If you want to change that default My Account page, here are some ideas for both coders and non-coders.

Coders

  1. Implement hook_profile_alter in a custom module and go ahead and unset any sections, change the order of things, or change the titles or content itself. This hook and the way this user content is arranged has been improved in Drupal 6 but it is usable in Drupal 5 as well.

  2. Add in your own user content by implementing hook_user using $op of 'view' in a custom module.

  3. Use hook_menu_alter. In Drupal 6 this great hook lets you change menu callbacks. If you want to completely override the My Account page, you could override the callback to display your own custom content.

Non-coders

  1. Take over the entire page using panels. You can create a panel with the path of user/% and give it an argument of user, then set your own content. This will override the usual My Account page content and give you complete control.

  2. Try out my My Account Alter module, which is just a user interface to let admins remove or re-order the My Account content. I just ported it to Drupal 6 with improvements.

  3. To add your own content to the page without removing the existing content, you can add a block and set it to display on user/*.

Jody Hamilton
I am passionate about the quality of our work and I maintain high standards for my team. I am deeply committed to the projects I lead, typically coming up with solutions for them at all hours. I care... Read more

Contact

Send us a message

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.