summaryrefslogtreecommitdiffstats
path: root/wp-includes/wpmu-functions.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-08-23 08:44:57 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-08-23 08:44:57 +0000
commitfe841cb4460abc8661462a58908cfc363c0e73e7 (patch)
treef76ca0968f2e7d5bab388cda27197459561014db /wp-includes/wpmu-functions.php
parent589234f7fa9e0bcb1817801e700e8eafc3ea2808 (diff)
downloadwordpress-mu-fe841cb4460abc8661462a58908cfc363c0e73e7.tar.gz
wordpress-mu-fe841cb4460abc8661462a58908cfc363c0e73e7.tar.xz
wordpress-mu-fe841cb4460abc8661462a58908cfc363c0e73e7.zip
Check that banned email list is an array. (fixes #121)
Lowercase the email address before checking. git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@726 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/wpmu-functions.php')
-rw-r--r--wp-includes/wpmu-functions.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/wp-includes/wpmu-functions.php b/wp-includes/wpmu-functions.php
index 4e5e03b..cb1ab88 100644
--- a/wp-includes/wpmu-functions.php
+++ b/wp-includes/wpmu-functions.php
@@ -446,6 +446,10 @@ function get_blogs_of_user( $id ) {
global $wpdb, $wpmuBaseTablePrefix;
$user = get_userdata( $id );
+
+ if ( !$user )
+ return false;
+
$blogs = array();
$i = 0;
@@ -877,9 +881,12 @@ function wpmu_validate_user_signup($user_name, $user_email) {
}
$banned_names = get_site_option( "banned_email_domains" );
- $email_domain = substr( $user_email, 1 + strpos( $user_email, '@' ) );
- if( in_array( $email_domain, $banned_names ) == true ) {
- $errors->add('user_email', __("You cannot use that email address to signup. Please use another provider."));
+ if ( is_array( $banned_names ) && empty( $banned_names ) == false ) {
+ $email_domain = strtolower( substr( $user_email, 1 + strpos( $user_email, '@' ) ) );
+ foreach( $banned_names as $banned_domain ) {
+ if( strstr( $email_domain, $banned_domain ) )
+ $errors->add('user_email', __("You cannot use that email address to signup. We are having problems with them blocking some of our email. Please use another email provider."));
+ }
}
if( strlen( $user_name ) < 4 ) {