Under admin/user/settings, I added "!password" to the password recovery template.

I requested a new password via /user/password, but the email I received looked like this:

testuser,

A request to reset the password for your account has been made at example.com

username: testuser
password: !password

The relavent code in modules/user/user.module is:

function user_mail_tokens($account, $language) {
...
...
 if (!empty($account->password)) {
    $tokens['!password'] = $account->password;
  }

Either:

1. !password should not be advertised as an available token for the password recovery template,

2. the password should not be blank. Reset the password to a random value using user_password()

Comments

samhassell’s picture

Hi,

Please see http://drupal.org/node/660302 where we are working on a patch for this problem.

samhassell’s picture

Status: Active » Closed (duplicate)

Marked as duplicate of http://drupal.org/node/660302

Alan.Guggenheim’s picture

subscribe

dspring0021’s picture

Question: How is this a dup of http://drupal.org/node/660302 when that issue is logged toward D7 and this one is logged toward D6? I'm a D6'er who would like the advertised !password token to work in user registration emails in D6 as well. Any ideas?

lcampanis’s picture

Same here please... This is not a duplicate as the other one is for Drupal 7.

lcampanis’s picture

Component: user system » token system
Priority: Normal » Critical
Status: Closed (duplicate) » Active
iNade’s picture

Subscribing, same issue with 6.19.

iNade’s picture

Version: 6.14 » 6.19
dave reid’s picture

Component: token system » user system

There is no real token system for Drupal 6, moving component.

marcusx’s picture

Subscribing

dpearcefl’s picture

Status: Active » Postponed (maintainer needs more info)

Is this issue fixed in the latest D6? is there any interest in pursuing this issue?

dpearcefl’s picture

Status: Postponed (maintainer needs more info) » Active
Stier’s picture

Version: 6.19 » 6.22

Subscribing, I have the same issue.

grasmash’s picture

Also experiencing this issue. !password token does not work in Drupal 6.22

darrellduane’s picture

This is happening to me in Drupal 7.26. Any idea what might be causing it there?

darrellduane’s picture

This is happening to me in Drupal 7.26. Any idea what might be causing it there?

darrellduane’s picture

This is happening to me in Drupal 7.26. Any idea what might be causing it there?

darrellduane’s picture

OK, I now see why these aren't working. It's be cause Drupal 7 has a new format for tokens in these messages. Hope this helps someone else who migrated from D6 ->D7 and found this happening.

Status: Active » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.