Make WordPress Core

Opened 9 years ago

Closed 4 years ago

Last modified 4 years ago

#35509 closed enhancement (duplicate)

Add filter `email_exists` in `email_exists` function

Reported by: sebastianpisula's profile sebastian.pisula Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Users Keywords: has-patch
Focuses: Cc:

Description

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 9 years ago.

Download all attachments as: .zip

Change History (9)

#1 @swissspidy
9 years ago

  • Keywords has-patch added

#2 @markoheijnen
9 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
8 years ago

  • Keywords close reporter-feedback added

#4 @SergeyBiryukov
6 years ago

#47683 was marked as a duplicate.

#5 @mikelopez
6 years 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.
---

Thanks.

#6 @SergeyBiryukov
4 years ago

Related/duplicate: #51379

#7 @SergeyBiryukov
4 years ago

  • Keywords close reporter-feedback removed
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Thanks for the ticket, sorry it took a while to review.

Closing in favor of #51379, which has some more discussion.

#8 @SergeyBiryukov
4 years ago

In 49148:

Users: Introduce email_exists filter, to complement username_exists.

Props garrett-eclipse, apermo, mukesh27, Mista-Flo, sebastian.pisula, mikelopez.
Fixes #51379. See #35509.

Note: See TracTickets for help on using tickets.