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
Comment #1
samhassell commentedHi,
Please see http://drupal.org/node/660302 where we are working on a patch for this problem.
Comment #2
samhassell commentedMarked as duplicate of http://drupal.org/node/660302
Comment #3
Alan.Guggenheim commentedsubscribe
Comment #4
dspring0021 commentedQuestion: 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?
Comment #5
lcampanis commentedSame here please... This is not a duplicate as the other one is for Drupal 7.
Comment #6
lcampanis commentedComment #7
iNade commentedSubscribing, same issue with 6.19.
Comment #8
iNade commentedComment #9
dave reidThere is no real token system for Drupal 6, moving component.
Comment #10
marcusx commentedSubscribing
Comment #11
dpearcefl commentedIs this issue fixed in the latest D6? is there any interest in pursuing this issue?
Comment #12
dpearcefl commentedComment #13
Stier commentedSubscribing, I have the same issue.
Comment #14
grasmash commentedAlso experiencing this issue. !password token does not work in Drupal 6.22
Comment #15
darrellduane commentedThis is happening to me in Drupal 7.26. Any idea what might be causing it there?
Comment #16
darrellduane commentedThis is happening to me in Drupal 7.26. Any idea what might be causing it there?
Comment #17
darrellduane commentedThis is happening to me in Drupal 7.26. Any idea what might be causing it there?
Comment #18
darrellduane commentedOK, 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.