Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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.
Comment | File | Size | Author |
---|---|---|---|
#4 | 1849112.commons_profile_base.short_name_token.patch | 1.75 KB | jpontani |
#2 | commons_add-short-name-token-1849112.patch | 1.68 KB | Pierre Paul Lefebvre |
Comments
Comment #1
Pierre Paul Lefebvre CreditAttribution: Pierre Paul Lefebvre commentedComment #2
Pierre Paul Lefebvre CreditAttribution: Pierre Paul Lefebvre commentedI'm not sure I got the patch right...
Comment #3
ezra-g CreditAttribution: ezra-g commentedMoving to "normal" priority sine this is not a release blocker.
Comment #4
jpontani CreditAttribution: jpontani commentedThis 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.
Comment #4.0
jpontani CreditAttribution: jpontani commentedClarify token location options.
Comment #5
japerryPretty sure this is already fixed. We're using the realname module now with tokens which addresses the issue.