Currently we are displaying the username instead of the formatted username in user page tab.

Comments

rli’s picture

StatusFileSize
new732 bytes

used format_username to display the real name.

adammalone’s picture

Title: display formatted username in user page » display formatted username in subscriptions tab [patch attached]
Category: bug » feature
Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, format_username_subscriptions-1781870-1.patch, failed testing.

adammalone’s picture

Two possible patches attached.

  • The first changes all the instances of $user->name in the module,
  • The second changes only the instances of $user->name when it is setting a page title on a subscription tab

I guess the previous patch didn't work as it was applied in the sites directory to the downloaded module rather than to the one cloned from git. Cross fingers these patches pass tests!

adammalone’s picture

Status: Needs work » Needs review
salvis’s picture

Title: display formatted username in subscriptions tab [patch attached] » Use format_username() on all user names in the UI
Version: 7.x-1.0 » 7.x-1.x-dev
Category: feature » bug
Status: Needs review » Fixed

I agree that this needs to be fixed, thank you, but this turned out to be considerably more involved...

There were two additional places where we displayed unformatted user names:
1. in the node form (subscriptions_ui.module) for by-user subscriptions, and
2. in the Author column under user/%/subscriptions (for by-user subscriptions).

format_name() requires an $account, not a string! You haven't actually tried this out, have you?

The result of format_name() needs to be passed through check_plain() exactly once.

I've committed the necessary changes to the -dev version.

adammalone’s picture

wow, complete fail to properly read the documentation by me! Thanks for patching correctly and informing me, I'd have been happy to patch myself if you hadn't have :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.