Self-titled

Files: 
CommentFileSizeAuthor
#16 drupal-raw-username-token-734878-16.patch5.49 KBAlan D.
PASSED: [[SimpleTest]]: [MySQL] 59,608 pass(es).
[ View ]
#8 drupal-raw-username-token-734878-8.patch5.28 KBAlan D.
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch drupal-raw-username-token-734878-8.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#1 734878-username-format-token-D7.patch689 bytesDave Reid
PASSED: [[SimpleTest]]: [MySQL] 18,528 pass(es).
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new689 bytes
PASSED: [[SimpleTest]]: [MySQL] 18,528 pass(es).
[ View ]

Simple patch for review.

Assigned:Unassigned» Dave Reid

Patch works great. Made a quick module containing a simple hook_username_alter(), and the change showed up in a pathauto generated URL alias.

Status:Needs review» Reviewed & tested by the community

Patch works fine.

Can someone explain why theme_username does not use format_username to get the name?

Status:Reviewed & tested by the community» Fixed

Straight-forward fix. Committed to HEAD. Thanks!

preprocess_username users format_username already.

Status:Fixed» Closed (fixed)

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

Version:7.x-dev» 8.x-dev
Status:Closed (fixed)» Needs review
StatusFileSize
new5.28 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch drupal-raw-username-token-734878-8.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

With this patch, we lose the ability to access the username in user emails, etc.

I would suggest providing the user-raw token that the RealName module provides into core, otherwise every implementation of hook_username_alter() will need to provide their own tokens.

With this patch, we lose the ability to access the username in user emails

Maybe it's not obvious for me, but can you eloberate why?

Because the token [user:name] uses $account->name run through format_username() that invokes hook_username_alter().

For example, the Name module also implements this. This provides a multi-component name field and unlimited formatting options. We were using this, with the format "First name Surname" and the resulting emails sent using the user email templates were giving "username: Mr John Doe" rather then "username: johndoe"

We could also have an extra layer of nesting:
[user:name:formatted]
[user:name:raw]
The former would be the default and would be implied when doing [user:name].
What do you guys think?

Issue tags:+needs backport to D7

Fixing tag

Title:[user:name] tokens should be using format_username()[user:name] tokens should be using format_username() and use [user:name-raw] in email templates

Looks like this is the core case for #1827980: Post module enable/disable requirements (README): Account settings - E-mails require manual update, isn't it?

Are we able to get this in and change all username tokens in email templates to name-raw, please?

Status:Needs review» Needs work
Issue tags:+token, +needs backport to D7

The last submitted patch, drupal-raw-username-token-734878-8.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new5.49 KB
PASSED: [[SimpleTest]]: [MySQL] 59,608 pass(es).
[ View ]

re-roll