1

A user registered with my WordPress blog as "[email protected]" (for example).

I'm fine with that. However, if the user comes back with "[email protected]", I want to stop him for registering again, and maybe politely remind him that he's already registered with the "same" gmail address.

Is there a plugin that does this?

Same question for things like "[email protected]" and "[email protected]" (using extra dots in the email address, which gmail recognizes as the same address).

I realize people can easily get free no-registration-required email addresses, so this won't stop someone from registering multiple times, but it might help.

1 Answer 1

0

You could use the user_register hook to normalize the email address and either store it in a separate field in the database or just do a query to see if the normalized email address matches. I don't see one that is a pre-user_register hook though, so it appears that you would have to delete the user after it was created if the user is already registered.

Here is the link to the docs: http://codex.wordpress.org/Plugin_API/Action_Reference/user_register

And here is a stackoverflow question about normalizing gmail addresses: https://stackoverflow.com/questions/15592956/gmail-username-collapsing

And some code to do it:

https://stackoverflow.com/questions/1586389/how-to-check-for-a-duplicate-email-address-in-php-considering-gmail-user-name

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.