Opened 15 years ago
Closed 14 years ago
#2277 closed defect (bug) (fixed)
Add same signup email checks (is, dup, domain) when editing profile settings
Reported by: | nuprn1 | Owned by: | |
---|---|---|---|
Milestone: | 1.5 | Priority: | normal |
Severity: | Version: | ||
Component: | Core | Keywords: | |
Cc: |
Description
something like this needs to be added to the profile > settings > general page
//need to make sure changing an email address does not already exists if ( $_POST['email'] != '' ) { //what is missing from the profile page vs signup - lets double check the goodies $user_email = sanitize_email( wp_specialchars( trim( $_POST['email'] ) ) ); if ( !is_email( $user_email ) ) $email_error = true; $limited_email_domains = get_site_option( 'limited_email_domains', 'buddypress' ); if ( is_array( $limited_email_domains ) && empty( $limited_email_domains ) == false ) { $emaildomain = substr( $user_email, 1 + strpos( $user_email, '@' ) ); if ( in_array( $emaildomain, (array)$limited_email_domains ) == false ) $email_error = true; } if ( !$email_error && $current_user->user_email != $user_email ) { //we don't want email dups in the system if ( email_exists( $user_email ) ) $email_error = true; if (!$email_error) $current_user->user_email = $user_email; } }
Change History (2)
Note: See
TracTickets for help on using
tickets.
Bumping this to 1.3 (WP 3.0 release) so we can also add support for banned_email_domains in a multisites configuration.