Bonjour,
Comme vous voyez je suis française, je ne parviens pas à empêcher la réinitialisation du mot de passe par wordpress lors de la première connexion d'un membre. Je fais en sorte que le mot de passe soit généré par Toolset mais WordPress demande de le modifier dans l'interface wordpress. Ce qui me gêne.
Comment peut-on interdire cette réinitialisation ou modifier l'interface de cette réinitialisation afin de ne pas voir le logo wordpress s'afficher?
Cordialement
I am having trouble preventing wordpress from resetting password when a member logs in for the first time. I am making the password generated by Toolset but WordPress is asking for the modifier in the wordpress interface. What bother me.
How can we prohibit this reset or modify the interface of this reset so as not to see the wordpress logo displayed?
Then, in the user form for community registration, I would like to make the fields "last name" and "first name" mandatory.
How do I go about it?
Sorry if the translation is wrong. I use google translation.
add_filter('cred_form_validate','first_last_name_validation',10,2);
function first_last_name_validation($error_fields, $form_data)
{
//field data are field values and errors
list($fields,$errors)=$error_fields;
//validate if specific form
if ($form_data['id']==12345)
{
//check if first_name field value is empty
if (empty($fields['first_name']['value']))
{
//set error message for first_name field
$errors['first_name']='First name is required';
}
//check if last_name field value is empty
if (empty($fields['last_name']['value']))
{
//set error message for last_name field
$errors['last_name']='Last name is required';
}
}
return array($fields,$errors);
}
Note: Please replace '12345' with the actual ID of your user form.
I have tried everything (custom content is not possible from the Toolset plugin) (adding js code via the functions.php file) but it does not work or makes the site buggy.
I think I'm stuck at the functions.php file. I use the ocean wp theme because it is constructor.
What should I do ?
Hello,
I realized that I added some PHP code in JS editors. I left it for the moment so that you can see my contributions (even unnecessary). Of course, this is not efficient and I still don't know how to edit custom code in the toolset plugin.
Thanks for your help.
This script will make sure that the form can't be submitted without entering the first and last name.
As for the Toolset's custom code feature, it is not working on your website, because the security plugin seems to have set the "DISALLOW_FILE_EDIT" and "DISALLOW_FILE_MODS" constants to 'true'.