Make WordPress Core

Ticket #51379: email_exists.patch

File email_exists.patch, 807 bytes (added by apermo, 3 years ago)

Patch for the given example

  • public_html/wp-includes/user.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    14481448function email_exists( $email ) {
    14491449        $user = get_user_by( 'email', $email );
    14501450        if ( $user ) {
    1451                 return $user->ID;
     1451                $user_id = $user->ID;
     1452        } else {
     1453                $user_id = false;
    14521454        }
    1453         return false;
     1455
     1456        /**
     1457         * Filters whether the given email exists or not.
     1458         *
     1459         * @since TBD
     1460         *
     1461         * @param int|false $user_id The user's ID on success, and false on failure.
     1462         * @param string    $email   Email.
     1463         */
     1464        return apply_filters( 'email_exists', $user_id, $email );
    14541465}
    14551466
    14561467/**