Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

A user registered with my WordPress blog as "bob.smith+bc@gmail.com" (for example).

I'm fine with that. However, if the user comes back with "bob.smith+bc2@gmail.com", 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 "bob.smith@gmail.com" and "b.ob.smith@gmail.com" (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.

share|improve this question
add comment

1 Answer

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: http://stackoverflow.com/questions/15592956/gmail-username-collapsing

And some code to do it:

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.