The current dev release has added a check (per #1827980: Post module enable/disable requirements (README): Account settings - E-mails require manual update) to ensure that account e-mails have the [user:name-raw] token substituted for [user:name], so that username is still provided in welcome emails etc.

However, there are a fairly large number of sites which may be using both Real Name and other modules which may modify the registration/login process (e.g. Email Registration or LoginToboggan) to use identifiers other than the raw username. These sites may not want to include the [user:name-raw] token anywhere in the registration email, but instead use e.g. [user:mail]. The current approach prevents any changes to registration emails for such sites, unless the unwanted [user:name-raw] is added somewhere.

While understand don't want users installing the RealName module to end-up with misleading registration emails, at least those are fixable by correcting configuration, while the current resolution breaks existing functionality entirely. I'd like to suggest two modifications to the token verification:

1) The install checks are modified from REQUIREMENT_ERROR to REQUIREMENT_WARNING, and warning message modified, as they may not always be an error.
2) The admin settings form check is modified from a form_error to a warning message, to permit the email templates to be modified even if [user:name-raw] is not included in the template body, and the error message again modified.

Patch to follow...

Andrew

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dave Reid’s picture

Status: Active » Closed (duplicate)

Please take a glance at existing issues before filing new ones. We're already working on this with #2142507: [user:name-raw] token checks are incorrect.

aclubb’s picture

Status: Closed (duplicate) » Needs review
FileSize
3.6 KB

@Dave,

I'd already commented on #2142507: [user:name-raw] token checks are incorrect re above, and agreed that while impacting related functionality, this was a different issue.

Please see attached patch to address this specific issue.

Thanks,

Andrew

Dave Reid’s picture

@aclubb: My apologies. I didn't see you also had posted in the other issue and the titles were too similar so I thought they were duplicates.

I'm trying to consider just removing this requirements checks all-together. They are causing more problems than they are helping at this point.

aclubb’s picture

@Dave Reid - no worries! Personally, I think might be better to remove these checks, and just have a simple message displayed by hook_enable (similar to that currently shown by hook_disable), informing the user that there is a new token available which should be used in reg emails and other places where raw username required.

Having useful checks which don't flag spurious issues in some cases would be challenging, especially taking into account interactions with other modules.

hass’s picture

Status: Needs review » Fixed

I'm fine with changing this again. thanks for feedback.

http://drupalcode.org/project/realname.git/commit/18e7123

Status: Fixed » Closed (fixed)

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

max172’s picture

E-mail: "Account activation" template Non configurato
Replace the token [user:name] with [user:name-raw] in e-mail template, if using username for login.
Avviso
E-mail: "Welcome (new user created by administrator)" template Non configurato
Replace the token [user:name] with [user:name-raw] in e-mail template, if using username for login.