[Résolu] Send username and password in email from admin side when admin approve user
Ce fil est résolu. Voici une description du problème et la solution proposée.
Problem:
Using Cred edit user form, send username and password in email from admin side when admin approve user.
Solution:
We follow WordPress guidelines and in CRED USER EDIT form the behavior is to do not send any password on email notification but just a notice that the profile has been changed. In other words, CRED behavior is the same like WordPress. Our 2nd Tier also reported that we will not add such security holes in Toolset.
With CRED User Edit form its not possible, You can send password using email notification using "CRED User Create form".
This support ticket is created Il y a 7 années et 3 mois. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.
CRED is having notification facility In which we can send username and password to user after registration..but in my case I do not want to send password immediately , I would like to send it once admin check all the information of user and once he change the status of user from "Pending" to "active" & update user from the users section of admin..at that time I would like to send email to user for his/her username and password.
General steps to achieve this:
1. Create a dropdown custom user field "User state" and set default value to “Inactive user”
2. Auto-generate a CRED user form to register a new user, remove dropdown field "User state"
3. Add a deferred notification to the form which will be sent
4. Add the form to a page, visit the page, submit the form
5. Go to the newly created user profile, select “Active user” and save
6. Wait for notification email... it sent the email to user
I have tried the solution given by you and found 2 issues regarding that.
A) As you have mentioned in 2nd step
2. Auto-generate a CRED user form to register a new user, remove dropdown field "User state"
I have removed dropdown field "User state" but then it is not allowing me to select it for notification.Please check attached screenshot for the same.
B) If I keep dropdown field "User state" It is allowing me to select that field for notification, But it is not sending me the password in email..It is sending me lost password link.
1. Ok, instead of removing User state field you can hide it using hidden="true" in the div like this, it will then be selectable in CRED notifications:
2. For sending user Password in email, both WP and CRED only sends it while adding a new user (with New User Form). In the Edit user form there is no shortcode like %%USER_PASSWORD%% it only has reset password shortcode.