I configured my wordpress site with SSO and when I return to my Discourse site I get the message
An account could not be registered with the email address . Please contact the site’s administrator.
On google I found that I must disable email verification on wordpress (How to turn off Discourse email verification?).
So I modified discourse-sso.php in my wordpress site as
$require_activation = apply_filters( ‘discourse_email_verification’, $require_activation, $user_id );
$require_activation = apply_filters( ‘discourse_email_verification’, false, $user_id );
but with no luck
Can anyone tell me how can I overcome this problem
Probably the first thing you want to do is disable SSO on Discourse so that you can login to your forum. Go to your forum at
/users/admin-login, enter your Discourse email address in the text box, and then follow the instructions in the email that you receive. When you login to your site, uncheck the enable_sso setting.
What you are doing to disable email verification should work, but it’s not the way the code is intended to be used. The reason for having a filter there is so that people don’t need to edit the plugin’s code to make changes to it. It also doesn’t seem to be solving your problem. Generally, it’s a bad idea to disable email verification.
The first thing you should check is to make sure that you are using the same email address for your admin accounts on both Discourse and WordPress. If they aren’t the same, change one of them so that they match and then try logging in with SSO again.
What could we do if we want to keep enable SSO ?
Could you explain the issue you’re having a bit more? Did you try the steps that @simon mentioned above?