Make WordPress Core

Opened 5 years ago

Last modified 13 months ago

#35509 new enhancement

Add filter `email_exists` in `email_exists` function

Reported by: sebastian.pisula Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Users Keywords: has-patch close reporter-feedback
Focuses: Cc:


I can check in ajax that user is add in other table for example in newsletter list.

Attachments (1)

35509.patch (971 bytes) - added by sebastian.pisula 5 years ago.

Download all attachments as: .zip

Change History (6)

#1 @swissspidy
5 years ago

  • Keywords has-patch added

#2 @markoheijnen
5 years ago

I think a filter in email_exists() is a wrong solution. It's a function to check if the user exists in the WordPress user table. Manipulating that can result in weird behaviour. In your example it seems like it's something the plugin can solve itself.

Please elaborate a bit more on why you want it in email_exists().

#3 @swissspidy
3 years ago

  • Keywords close reporter-feedback added

#4 @SergeyBiryukov
13 months ago

#47683 was marked as a duplicate.

#5 @mikelopez
13 months ago

Hey, I'm adding my case here from #47683 as per @SergeyBiryukov's advise.

Also should I post my patch here as well?

Now that we're allowing login using email address I think we should also add an email_exists filter similar to the existing username_exists one.

Reason for this request is I'm creating a plugin that allows for a shared user database across multiple WordPress installs hosted on different servers.

Said plugin also allows creating new users on any of the site which then syncs back the data to the shared user database. It is at this point that I find the need of an email_exists filter. I can easily check if the username exists by hooking into the username_exists filter but I can't do the same for email addresses.


Note: See TracTickets for help on using tickets.