diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-10-16 13:12:04 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-10-16 13:12:04 +0000 |
| commit | ab00ba3f858e06087fd03826c8bac88bc62ff4e4 (patch) | |
| tree | 5f306977acd2aaf4014a31504a773ed66267ac5f /wp-admin/wpmu-edit.php | |
| parent | 66df7b815bf4cd9dff862e6200e1c366e02b08eb (diff) | |
| download | wordpress-mu-ab00ba3f858e06087fd03826c8bac88bc62ff4e4.tar.gz wordpress-mu-ab00ba3f858e06087fd03826c8bac88bc62ff4e4.tar.xz wordpress-mu-ab00ba3f858e06087fd03826c8bac88bc62ff4e4.zip | |
Check email if it's not blank
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1081 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-admin/wpmu-edit.php')
| -rw-r--r-- | wp-admin/wpmu-edit.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/wp-admin/wpmu-edit.php b/wp-admin/wpmu-edit.php index 63056b0..b233fa2 100644 --- a/wp-admin/wpmu-edit.php +++ b/wp-admin/wpmu-edit.php @@ -118,6 +118,8 @@ switch( $_GET[ 'action' ] ) { $blog = $_POST['blog']; $domain = strtolower( wp_specialchars( $blog['domain'] ) ); $email = wp_specialchars( $blog['email'] ); + if( $email != '' && !is_email( $email ) ) + die( "Invalid email address" ); if( constant( "VHOST" ) == 'yes' ) { $newdomain = $domain.".".$current_site->domain; $path = $base; @@ -127,7 +129,7 @@ switch( $_GET[ 'action' ] ) { } $user_id = email_exists($email); - if( !$user_id ) { // I'm not sure what this check should be. + if( !$user_id ) { $password = generate_random_password(); $user_id = wpmu_create_user( $domain, $password, $email ); if(false == $user_id) { |
