diff --git a/wp-register.php b/wp-register.php index 8591de7b74..b3e556b2d6 100644 --- a/wp-register.php +++ b/wp-register.php @@ -30,6 +30,11 @@ case 'register': if ( username_exists( $user_login ) ) $errors['user_login'] = __('ERROR: This username is already registered, please choose another one.'); + /* checking the email isn't already used by another user */ + $email_exists = $wpdb->get_row("SELECT user_email FROM $wpdb->users WHERE user_email = '$user_email'"); + if ( $email_exists) + die (__('ERROR: This email address is already registered, please supply another.')); + if ( 0 == count($errors) ) { $password = substr( md5( uniqid( microtime() ) ), 0, 7);