Hi,

I basically want the My Account link generated in the user menu to point to user/%/edit instead of user. I've tried using hook_menu_alter(), but I'm clearly doing something wrong. It seems as though this should be a pretty straightforward function to place in the template file of my custom theme, but I'm struggling.

Thanks in advance for any assistance.
KMT

Comments

=-=

not possible to deal with by disabling the default menu item and creating a new?

It is not possible to create

It is not possible to create a menu item with argument (%) in Drupal menu management interface. I think module 'me' may help you to do this.

Rules can do this for you.

Here's an exported rule I just whipped up to get you started.

{ "rules_redirect_user_account_pages" : {
    "LABEL" : "Redirect user account pages",
    "PLUGIN" : "reaction rule",
    "REQUIRES" : [ "rules" ],
    "ON" : [ "user_view" ],
    "IF" : [
      { "data_is" : { "data" : [ "account:uid" ], "value" : [ "site:current-user:uid" ] } }
    ],
    "DO" : [ { "redirect" : { "url" : "[account:edit-url]" } } ]
  }
}

Good luck, have fun...

--BitRadiator

nobody click here