An account could not be registered with the email address. Please contact the site's administrator

AI-generated summary

A user, ThGoum, is experiencing an issue with registering an account on their Discourse site using SSO from WordPress, receiving the error message “An account could not be registered with the email address. Please contact the site’s administrator.” ThGoum attempted to disable email verification on WordPress by modifying the discourse-sso.php file, but it did not resolve the issue.

simon suggested temporarily disabling SSO on Discourse to log in and investigate the issue. He also advised checking that the admin email addresses on both Discourse and WordPress match, as it is likely the root cause of the problem. Additionally, simon cautioned against disabling email verification.

Donavan_Martin inquired about potential solutions to resolve the issue while keeping SSO enabled. angus responded by asking Donavan_Martin to provide more details about their issue and whether they had tried the steps suggested by simon.

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? - #3 by Alexander_Oskin).

So I modified discourse-sso.php in my wordpress site as
$require_activation = apply_filters( ‘discourse_email_verification’, $require_activation, $user_id );
to
$require_activation = apply_filters( ‘discourse_email_verification’, false, $user_id );

but with no luck
Can anyone tell me how can I overcome this problem

Regards

Theo

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 ?

Hey Donavan :slight_smile:

Could you explain the issue you’re having a bit more? Did you try the steps that @simon mentioned above?