Taking control of your 'My Account' page
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/*.





Using tokens as node title
Hi Jody,
Thanks so much for your post! I found it very useful as I am a non-coder and a Drupal noob as well but have been wanting to customize the look of the My Account page in our website :D
I am now using Panels module, like what you've written, and looking forward to using the My Account alter module too.
I hope you could help me with this question. You see, I'm using the Automatic Nodetitles module so that in the My Account content type that I've created, I could get rid of the title field and instead automatically generate one using tokens. I decided to use [user-name] as token.
However, I'm experiencing problems with it. For example, I'm currently logged in as superadmin , but the title displays My Account. When I look into or logged into other profiles I've created, the token works perfectly, showing the username of the currently logged user.
Is this a bug or could I do something to correct this?
Thanks so much for your time :)
Regards,
Cecille
Post new comment