summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-10-02 11:47:10 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-10-02 11:47:10 +0000
commit6cf373807d1ea716ca99d2e0a90d9bec7c4e7177 (patch)
treef0e72ed2b5fac00a72ce14d6bc3bbaa0e6465be5
parent37fcf9958978a3c49c0e14913772bea688a51b49 (diff)
downloadwordpress-mu-6cf373807d1ea716ca99d2e0a90d9bec7c4e7177.tar.gz
wordpress-mu-6cf373807d1ea716ca99d2e0a90d9bec7c4e7177.tar.xz
wordpress-mu-6cf373807d1ea716ca99d2e0a90d9bec7c4e7177.zip
Send welcome email to users when blog created from backend.
git-svn-id: http://svn.automattic.com/wordpress-mu/branches/2.6@1501 7be80a69-a1ef-0310-a953-fb0f7c49ff36
-rw-r--r--wp-admin/wpmu-edit.php2
-rw-r--r--wp-includes/wpmu-functions.php2
2 files changed, 3 insertions, 1 deletions
diff --git a/wp-admin/wpmu-edit.php b/wp-admin/wpmu-edit.php
index 91d2d41..ed93577 100644
--- a/wp-admin/wpmu-edit.php
+++ b/wp-admin/wpmu-edit.php
@@ -113,6 +113,7 @@ switch( $_GET['action'] ) {
$path = $base.$domain.'/';
}
+ $password = 'N/A';
$user_id = email_exists($email);
if( !$user_id ) {
$password = generate_random_password();
@@ -132,6 +133,7 @@ switch( $_GET['action'] ) {
update_user_option( $user_id, 'primary_blog', $id, true );
$content_mail = sprintf( __( "New blog created by %1s\n\nAddress: http://%2s\nName: %3s"), $current_user->user_login , $newdomain.$path, stripslashes( $title ) );
wp_mail( get_site_option('admin_email'), sprintf(__('[%s] New Blog Created'), $current_site->site_name), $content_mail, 'From: "Site Admin" <' . get_site_option( 'admin_email' ) . '>' );
+ wpmu_welcome_notification( $id, $user_id, $password, $title, array( "public" => 1 ) );
wp_redirect( add_query_arg( array('updated' => 'true', 'action' => 'add-blog'), $_SERVER['HTTP_REFERER'] ) );
exit();
} else {
diff --git a/wp-includes/wpmu-functions.php b/wp-includes/wpmu-functions.php
index c452171..ba7017b 100644
--- a/wp-includes/wpmu-functions.php
+++ b/wp-includes/wpmu-functions.php
@@ -1480,7 +1480,7 @@ SITE_NAME" ) );
$message = $welcome_email;
if( empty( $current_site->site_name ) )
$current_site->site_name = "WordPress MU";
- $subject = sprintf(__('New %1$s Blog: %2$s'), $current_site->site_name, $title);
+ $subject = sprintf(__('New %1$s Blog: %2$s'), $current_site->site_name, stripslashes( $title ) );
wp_mail($user->user_email, $subject, $message, $message_headers);
return true;
}