There are situations such as in Commons email notifications where it would be ideal to address the user by her first name, but be able to fall back on the username if the first name field isn't populated or isn't defined on the site.

This token should probably live in Commons_Profile_base, but could potentially be sufficient in Commons Activity streams.

Comments

Pierre Paul Lefebvre’s picture

Assigned:Unassigned» Pierre Paul Lefebvre
Pierre Paul Lefebvre’s picture

Status:Active» Needs review
StatusFileSize
new1.68 KB

I'm not sure I got the patch right...

ezra-g’s picture

Priority:Major» Normal

Moving to "normal" priority sine this is not a release blocker.

jpontani’s picture

This patch doesn't actually apply to commons_profile_base, it applies to a full build of commons (using drush make with --working-copy).

Re-rolled against commons_profile_base repo, and added a fix, since the original patch only checks for the exact token of "[user:short-name]", whereas tokens could exist such as "[message:user:short-name]" and then not be replaced properly.

jpontani’s picture

Issue summary:View changes

Clarify token location options.

japerry’s picture

Version:» 7.x-3.x-dev
Issue summary:View changes
Status:Needs review» Fixed

Pretty sure this is already fixed. We're using the realname module now with tokens which addresses the issue.

Status:Fixed» Closed (fixed)

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