Changeset 6269 for trunk/bp-settings/bp-settings-actions.php
- Timestamp:
- 08/29/2012 06:47:11 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-settings/bp-settings-actions.php
r6183 r6269 72 72 if ( $bp->displayed_user->userdata->user_email != $user_email ) { 73 73 74 // Is email valid 75 if ( !is_email( $user_email ) ) 76 $email_error = 'invalid'; 77 78 // Get blocked email domains 79 $limited_email_domains = get_site_option( 'limited_email_domains', 'buddypress' ); 80 81 // If blocked email domains exist, see if this is one of them 82 if ( is_array( $limited_email_domains ) && empty( $limited_email_domains ) == false ) { 83 $emaildomain = substr( $user_email, 1 + strpos( $user_email, '@' ) ); 84 85 if ( in_array( $emaildomain, (array) $limited_email_domains ) == false ) { 74 // Run some tests on the email address 75 $email_checks = bp_core_validate_email_address( $user_email ); 76 77 if ( true !== $email_checks ) { 78 if ( isset( $email_checks['invalid'] ) ) { 79 $email_error = 'invalid'; 80 } 81 82 if ( isset( $email_checks['domain_banned'] ) || isset( $email_checks['domain_not_allowed'] ) ) { 86 83 $email_error = 'blocked'; 87 84 } 88 } 89 90 // No errors, and email address doesn't match 91 if ( ( false === $email_error ) && email_exists( $user_email ) ) { 92 $email_error = 'taken'; 85 86 if ( isset( $email_checks['in_use'] ) ) { 87 $email_error = 'taken'; 88 } 93 89 } 94 90
Note: See TracChangeset
for help on using the changeset viewer.