Bug was introduced in #1827980: Post module enable/disable requirements (README): Account settings - E-mails require manual update

Account settings form validation fails if mail body template begins with [user:name-raw] token.
Relates to following mail templates:

  • Welcome (new user created by administrator) - email_admin_created -
  • Welcome (no approval required) - email_no_approval_required
  • Account activation - email_activated

There are also incorrect checks in hook_requirements().

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

AndreyMaximov’s picture

AndreyMaximov’s picture

Status: Active » Needs review
maximpodorov’s picture

Status: Needs review » Reviewed & tested by the community

Obvious fix. Please commit.

AndreyMaximov’s picture

Title: Account settings form does not pass validation » [user:name-raw] token checks are incorrect
Issue summary: View changes
FileSize
2.7 KB
2.14 KB

There are also incorrect checks in hook_requirements() resulting in red rows in status report.

AndreyMaximov’s picture

Status: Reviewed & tested by the community » Needs review
dpovshed’s picture

Fix in #4 looks fine with me.

andypost’s picture

Status: Needs review » Reviewed & tested by the community

good to go!

aclubb’s picture

While this fix looks fine for what it does, there are sites which may be using both RealName and e.g. Email Registration modules, which will not want to include [user:name-raw] anywhere in the registration email, but instead use e.g. [user:mail]. The current approach prevents changes to registration emails for such sites, unless the unwanted [user:name-raw] is added.

While understand don't want users installing the RealName module to end-up with misleading registration emails, at least those are fixable, while the resolution breaks existing functionality. Would it be possible to look at modifying to provide REQUIREMENT_WARNINGs instead, so that sites installing are informed that they need to modify their email templates, whilst not breaking things for sites that don't want to have [user:name-raw] in the templates.

maximpodorov’s picture

@aclubb, you mention another issue which should not stop fixing this one.

aclubb’s picture

@maximpodorov - fair enough - will open another issue

hass’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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