Hello,
When a user is registred on my website, his role is pending
1) How can i send him notification email contening his password after genarating a new password for him ?
2) Is it possible via code, to change user role and send him a new password ?
Thank you
It’s not too secure to send passwords via e-mail. That’s why WordPress uses reset password technique. Why do not use this feature?
User inputs his email after click on the ‘reset password’ link at login page (wp-login.php?action=lostpassword) and gets by email a special protected link to a page, where he can input his new password.
WordPress does not store user password at the database. It stores just a password hash value. So it’s not possible to get user password in its original not encrypted form from the database. You should catch a password value earlier, when you change it.