summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-01-24 13:23:19 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-01-24 13:23:19 +0000
commitab2d6e7c5468870209730dc31af5d572222546ce (patch)
tree066e9513fa87099bd012bf72d3f02bc63b880dee
parent9384882739906e813f1a05491fd73e47e8105dee (diff)
downloadwordpress-mu-ab2d6e7c5468870209730dc31af5d572222546ce.tar.gz
wordpress-mu-ab2d6e7c5468870209730dc31af5d572222546ce.tar.xz
wordpress-mu-ab2d6e7c5468870209730dc31af5d572222546ce.zip
Fixed path to activation page for user-only registrations (fixes #234)
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@866 7be80a69-a1ef-0310-a953-fb0f7c49ff36
-rw-r--r--wp-activate.php2
-rw-r--r--wp-includes/wpmu-functions.php3
2 files changed, 3 insertions, 2 deletions
diff --git a/wp-activate.php b/wp-activate.php
index 8713d43..41af75b 100644
--- a/wp-activate.php
+++ b/wp-activate.php
@@ -26,7 +26,7 @@ form { margin-top: 2em; }
if ( empty($_GET['key']) && empty($_POST['key']) ) {
?>
<h2><?php _e('Activation Key Required') ?></h2>
-<form name="activateform" id="activateform" method="post" action="/wp-activate.php">
+<form name="activateform" id="activateform" method="post" action="<?php echo get_option( 'siteurl' ) ?>/wp-activate.php">
<table border="0" width="100%" cellpadding="9">
<tr>
<th valign="top"><?php _e('Activation Key:') ?></th>
diff --git a/wp-includes/wpmu-functions.php b/wp-includes/wpmu-functions.php
index b3cd49b..306d580 100644
--- a/wp-includes/wpmu-functions.php
+++ b/wp-includes/wpmu-functions.php
@@ -1069,12 +1069,13 @@ function wpmu_signup_blog_notification($domain, $path, $title, $user, $user_emai
}
function wpmu_signup_user_notification($user, $user_email, $key, $meta = '') {
+ global $current_site;
// Send email with activation link.
$admin_email = get_site_option( "admin_email" );
if( $admin_email == '' )
$admin_email = 'support@' . $_SERVER[ 'SERVER_NAME' ];
$message_headers = "MIME-Version: 1.0\n" . "From: " . get_site_option( "site_name" ) . " <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
- $message = sprintf(__("To activate your user, please click the following link:\n\n%s\n\nAfter you activate, you will receive *another email* with your login.\n\n"), "http://{$_SERVER[ 'SERVER_NAME' ]}/wp-activate.php?key=$key" );
+ $message = sprintf(__("To activate your user, please click the following link:\n\n%s\n\nAfter you activate, you will receive *another email* with your login.\n\n"), "http://{$current_site->domain}{$current_site->path}/wp-activate.php?key=$key" );
// TODO: Don't hard code activation link.
$subject = sprintf(__('Activate %s'), $user);
wp_mail($user_email, $subject, $message, $message_headers);