Make WordPress Core

Ticket #35509: 35509.patch

File 35509.patch, 971 bytes (added by sebastian.pisula, 9 years ago)
  • wp-includes/user.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    12111211 * @return int|false The user's ID on success, and false on failure.
    12121212 */
    12131213function email_exists( $email ) {
    1214         if ( $user = get_user_by( 'email', $email) ) {
    1215                 return $user->ID;
     1214        if ( $user = get_user_by( 'email', $email ) ) {
     1215
     1216                /**
     1217                 * Filter whether the Email exists or not
     1218                 *
     1219                 * @since 4.5.0
     1220                 *
     1221                 * @param int|false $user_id Email user id.
     1222                 * @param string $email Email.
     1223                 */
     1224
     1225                return apply_filters( 'email_exists', $user->ID, $email );
    12161226        }
    1217         return false;
     1227
     1228        /** This filter is documented in wp-includes/user.php */
     1229        return apply_filters( 'email_exists', false, $email );
    12181230}
    12191231
    12201232/**