WordPress.org

Make WordPress Core

Changes between Initial Version and Version 6 of Ticket #14834


Ignore:
Timestamp:
08/03/2011 04:29:33 AM (7 years ago)
Author:
dd32
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #14834

    • Property Keywords 2nd-opinion added
    • Property Cc Jeremy Malcolm added
    • Property Component changed from General to Users
    • Property Milestone changed from Awaiting Review to Future Release
  • Ticket #14834 – Description

    initial v6  
    33
    44In WP3, a check was added to determine whether or not the user already exists by their e-mail address.
    5 
     5{{{
    66if ( !$update && ! defined( 'WP_IMPORTING' ) && email_exists($user_email) )
    77          return new WP_Error('existing_user_email', __('This email address is already registered.') );
     8}}}
    89
    910The problem with this check is that it matches the admin account if you pass it a null or blank e-mail address.  The admin account, being created by the installation script, does not start with an e-mail address.
    1011
    1112This has caused one of my plugins (Simple LDAP Login) to fail. To fix this, I had to do this:
     13{{{
    1214if ( !function_exists('get_user_by_email') ) :
    1315/**
     
    3032}
    3133endif;
     34}}}
    3235
    3336Please consider changing this behavior in future versions. I hate having to modify core functions to keep a plugin working. :)