@rondilly
14 years, 6 months ago
Ok. Here’s the code. Find this in bp-core-signup.php
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 ) $errors->add( ‘user_email’, __( ‘Sorry, that email address is not allowed!’, ‘buddypress’ ) ); }
BELOW IT, ADD THIS;
//MY HACK $banned_email_domains = get_site_option( ‘banned_email_domains’, ‘buddypress’ );
if ( is_array( $banned_email_domains ) && empty( $banned_email_domains ) == false ) { $emaildomain = substr( $user_email, 1 + strpos( $user_email, ‘@’ ) );
if ( in_array( $emaildomain, (array)$banned_email_domains ) == true ) $errors->add( ‘user_email’, __( ‘Sorry, that email address is not allowed!’, ‘buddypress’ ) ); } //MY HACK
14 years, 9 months ago
There actually is a function in buddypress but it is named different from the wpmu version, and I can see no way to administer it.
If you check your bp-core-signup.php file you will see: `$limited_email_domains = get_site_option( ‘limited_email_domains’, ‘buddypress’ );`
Just change this line to: `$limited_email_domains = get_site_option( ‘banned_email_domains’, ‘buddypress’ );`
This will solve signups from excluded domain list. Hopefully this will be incorporated in bpress core for compatability.