Hi
I tried to install and test wpdiscuz on my website and everything was fine
but today I see this problem that logged in members can not send a comment
it is after I installed Digits OTP mobile SMS login plugin
cause I want my customers to register and log in using OTP SMS
for guest users everything is fine but after login, it shows Some of field value is invalid on comment submit
and no errors in the console
but my theme default comment is working fine and wpdiscuz for guest users is working fine too
the problem is only with logged in members
can you please help me with this?
I think the problem is that users have not any email on their profile and sign up just by mobile number
cause admin and another test user with email on the profile is able to post a comment after login
thank you
Please edit the "Email" filed and set not-required using the according option, then delete all caches and check again.
More info here: https://wpdiscuz.com/docs/wpdiscuz-7/getting-started/manage-comment-forms/comment-form-builder/#comment_form_fields
In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.
thank you for this guide
but I have the same error after doing your settings
I tried to disable ReCaptcha and set not required for email and name field
and try in cache disabled mode
but same error still exists
You should find some way to insert random email addresses for registered users, otherwise wpDiscuz will not work. Please note wpDiscuz gets the email address from WordPress wp_users table. As far as in your case the filed's value (email) is missing you see that error.
In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.
@asti TnX for help, I am not a technical person to solve this by code
nowadays many sites are switching to SMS and OTP login/registration
so can you please help me with generating random email for all users?any script or code guide?
and fix the problem with OTP sites in your next releases if possible because we love to use your plugin
thank you
Please try this code. Put the code in your current active WordPress theme functions.php file.
add_action("user_register", function ($user_id) {
$user = get_userdata($user_id);
if (empty($user->data->user_email)) {
$args = array(
"ID" => $user->id,
"user_email" => uniqid() . "@example.com",
);
wp_update_user( $args );
}
});
How to Easily Add Custom Code in WordPress (without Breaking Your Site).
The code above will work only for the new users. For old users you should edit the users and add some random email address.
In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.
@asti that work, tnx


