I need to send an email whenever a user is added or registers containing its clear password. I know it's a bad idea in terms of security but I need to do it for a private project. Any idea? Should I hook into user_register and do something or is there a simpler way?
I'm using Better Notification atm to manage my emails, thank you!
I need to send an email whenever a user is added or registers containing its clear password. I know it's a bad idea in terms of security but I need to do it for a private project. Any idea? Should I hook into user_register and do something or is there a simpler way?
I'm using Better Notification atm to manage my emails, thank you!
Share Improve this question asked Aug 14, 2020 at 14:26 demimontaltodemimontalto 11 Answer
Reset to default 1user_register isn't the solution for your needs because when this action is trigger, the password is already encrypted.
The best solution is to do a custom registration form and insert your new users with this hook: wp_insert_user()
When a user is register, you can send a custom email with the password not encrypted.