I have created an 'account activation email' message as follows:
Congratulations, your account at !site has been activated.
You may log in with following username and password:
username: !username
password: !password
When the message is recieved the !password is not converted to the users password. I'm guessing this is because the password is encrypted and therefore can not be retrieved.
But the help text for the this reads:
Enable and customize e-mail messages sent to users upon account activation (when an administrator activates an account of a user who has already registered, on a site where administrative approval is required). Available variables are: !username, !site, !password, !uri, !uri_brief, !mailto, !date, !login_uri, !edit_uri, !login_url.
Should the !password be removed?
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedI have this problem to.
Do you use a translation on your site (Dutch in my case). This might be the problem, since I have had this problem to with the pathauto module: See this thread: http://drupal.org/node/329506
This problem is different but might be related. But I don't know whether the translation really caused the problem like in the link.
Comment #2
cjgammon CreditAttribution: cjgammon commentedWas this problem ever solved? It doesn't seem to make sense that it is a translation issue. It says that the system will set up a password, but then when you try to echo that in the e-mail with !password, it doesn't work.
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedAs far as I know this isn't solved. I also don't have the PHP skills yet to dive in the code and solve this myself, but if there's anybody here who has this problem too and who can fix it, it would be nice of course if the fix becomes public.
Comment #4
cjgammon CreditAttribution: cjgammon commentedThis problem exists in drupal 6 as well.
Comment #5
degeer CreditAttribution: degeer commentedThe following function is called (in drupal6):
- !password is only set if the account password ($account->password) isn't empty.
I'm using http://drupal.org/project/genpass to automatically generate passwords, but it seems like $account->empty is empty anyway..
Comment #6
maheshvanneldas CreditAttribution: maheshvanneldas commentedYou can check for the hook_mail_alter, which in my case i found it in "user_type" module and the function is "user_types_mail_alter"
Here in $variables the !password is missing, we can add this missing value.
Which i did
Comment #7
balsamaI don't this is possible (possible to send the password in any email other than the account creation).
Drupal generates the password at account creation. Then hashes it and stores it in the database. There is no way to retrieve the unhashed version of the password after it is stored.
I think you would have to modify core to generate and store a new password when the activation email is sent.
Somebody please correct me if I am wrong.
Comment #8
mtpultz CreditAttribution: mtpultz commentedI've got this problem too trying to hunt down the above code and directly change it unfortunately I don't know any better.
I would think it should be possible as in my case a user can create an account, the admin gives them a password or has it auto selected and unblocks the account which triggers the activation email. Which in the user_settings page says that !password is a valid template variable.
Any other solutions then hacking? hack hack hack ACK!
Thanks :)
Comment #9
dpearcefl CreditAttribution: dpearcefl commentedConsidering the lack of activity on this issue and that Drupal v5 is no longer supported by fixes or patches, I am going to close this ticket. If this issue still exists and you want to continue to ask for technical support, please reopen and update this ticket.
Comment #10
jfama CreditAttribution: jfama commented3 years and two versions later, this core issue hasn't been resolved. Any ideas? Does it just make sense to not have the username/password combo and just the login url by default?
Comment #11
marcingy CreditAttribution: marcingy commentedPassword no longer exists as a token for security reasons only a 1 time login link now exists.