How can change RealName / User account link destination in D7 I'm using RealName module in D7 to show real names on nodes and in comments and would like to link the real name [user:first-name] [user:last-name] to a custom content type (a 'profile' page), instead of the standard 'user account'.

It is easy to use RealName in D6, but I've been searching for ages for a solution in D7.

I have read "Have username link to profile rather than regular userpage by default", but I am not using Content Profile.

I wondered if I need to 'preprocess' the user name, but can only read php and have no idea what to change there.

I have set the URLs for account pages to be [user:first-name]-[user:last-name]-account using URL alias patterns and the URLs of the custom content type I am trying to link to look like [user:first-name]-[user:last-name].

What is the simplest way to change the 'View user profile' link, which appears in comments and in node 'Authored by' to point at my custom user profiles instead of the standard 'user account's pages?
Did you try hook_username_alter in Drupal 7.


  Alter the username that is displayed for a user.
  
  Called by format_username() to allow modules to alter the username
  that's displayed. Can be used to ensure user privacy in situations
  where $account->name is too revealing.


I've used this occassionally, but I find sometimes there are instances where I felt it should have been called/used already and then wasn't (the Webform module submission report tables come to mind ...)