最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

users - Send clear password via mail

programmeradmin0浏览0评论

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 1
Add a comment  | 

1 Answer 1

Reset to default 1

user_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.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论