Alter the username that is displayed for a user.
Called by user_format_name() 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.
$name: The string that user_format_name() will return.
$account: The account object passed to user_format_name().
function hook_user_format_name_alter(&$name, $account) {
// Display the user's uid instead of name.
if (isset($account->uid)) {
$name = t('User !uid', array(
'!uid' => $account->uid,
));
}
}