This is a spinoff issue from #892950: (Tests needed) No welcome mail sent to new users after site administrator approval.

The mail a newly registered user gets after his account has been activated by a site admin contains the wrong link. The user cannot log in and set his password with this link.

The patch solves this issue.

The issue is critical, because newly registered users would never be able to access the site.

CommentFileSizeAuthor
user-mail-token-1.patch641 bytesreglogge

Comments

aaronbauman’s picture

This looks RTBC to me, but probably best to get another pair of eyes on it.

Pls’s picture

Status: Needs review » Reviewed & tested by the community

Looks and works good.

aspilicious’s picture

I think this is correct. I alrdy discovered this while translating drupal alpha 6 on localize.drupal.org. But didn't pay a lot of attention to it. :s

webchick’s picture

Status: Reviewed & tested by the community » Fixed

LOL well, that's a problem. :) Too bad I can't think of a way to write a test for this...

Committed to HEAD!

yesct’s picture

Is there a tag for human-test-impossible-to-code ?
would be useful for D8, yes?
I'll open an issue suggesting one if there is not already a tag.

sun’s picture

Priority: Critical » Major
Status: Fixed » Active
Issue tags: +Needs tests

This can be tested. All outgoing mails are captured by SimpleTest (instead of sent) and we are able to read out (parse) the contained link(s) from the mail and use them to check whether we can complete a user registration.

webchick’s picture

Title: Confirmation mail for user after account being activated contains wrong link - user cannot log in » Need tests for activation link in new user e-mail

Fixing title.

naxoc’s picture

I'll write a test today at the drupalcon code sprint

reglogge’s picture

#8: You could extend the test that was added here #892950: (Tests needed) No welcome mail sent to new users after site administrator approval for that. These tests already check for the mail being sent, but not for the content of the mail's body field.

reglogge’s picture