In admin/config/people/accounts , I want user password in welcome mail.

Currently it is

username: [user:name]
password: Your password

I want this

username: [user:name]
password: [uc_order:new-password] // this token is already available in order setting page admin/store/settings/checkout

Now question is is there anyway to make uc_order token available in user account setting page?


I think you are going about this the wrong way.

You can make the uc_order token globally avaialbe, but it would be a bit messy since some users wont have an order and other people have more than one order.

Instead you should use hook_mail_alter to actually insert the password from the order. You could search for [uc_order:new-password] and if found load the correct order and replace the value with the value from the order.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.