diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-08-12 15:57:04 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-08-12 15:57:04 +0000 |
commit | fa5d1271d065dd7dfb6a019f798c71194e0d4c02 (patch) | |
tree | b9b4da8afd0b6e79ec874d4bbf98aecac1e475a1 | |
parent | 51b69d89ca3050d82afd53bd2a591e78a45f3418 (diff) | |
download | wordpress-mu-fa5d1271d065dd7dfb6a019f798c71194e0d4c02.tar.gz wordpress-mu-fa5d1271d065dd7dfb6a019f798c71194e0d4c02.tar.xz wordpress-mu-fa5d1271d065dd7dfb6a019f798c71194e0d4c02.zip |
Added visitor pass to invite
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@180 7be80a69-a1ef-0310-a953-fb0f7c49ff36
-rw-r--r-- | wp-inst/wp-admin/invites.php | 8 | ||||
-rw-r--r-- | wp-inst/wp-content/mu-plugins/invites.php | 5 |
2 files changed, 9 insertions, 4 deletions
diff --git a/wp-inst/wp-admin/invites.php b/wp-inst/wp-admin/invites.php index 32d0774..8b21d7f 100644 --- a/wp-inst/wp-admin/invites.php +++ b/wp-inst/wp-admin/invites.php @@ -22,10 +22,12 @@ if( $_POST[ 'action' ] == 'send' ) { $subject = get_site_option( "invites_default_subject" ); $from = $cache_userdata[ $user_ID ]->user_email; + $visitor_pass = md5( $email ); $msg = str_replace( "FIRSTNAME", $_POST[ 'fname' ], $msg ); $msg = str_replace( "LASTNAME", $_POST[ 'lname' ], $msg ); $msg = str_replace( "PERSONALMESSAGE", $_POST[ 'personalmessage' ], $msg ); - $msg = str_replace( "\\r\\n", "\n", stripslashes( str_replace( "REGURL", "http://" . $current_site->domain . "/invite/".md5( $_POST[ 'email' ] ), $msg ) ) ); + $msg = str_replace( "VISITORPASS", $visitor_pass, $msg ); + $msg = str_replace( "\\r\\n", "\n", stripslashes( str_replace( "REGURL", "http://" . $current_site->domain . "/invite/" . $visitor_pass, $msg ) ) ); $subject = str_replace( "FIRSTNAME", $_POST[ 'fname' ], $subject ); if( $cache_userdata[ $user_ID ]->display_name != '' ) { @@ -56,7 +58,9 @@ if( $_POST[ 'action' ] == 'send' ) { exit; } } elseif( $_POST[ 'personalmessage' ] == '' ) { - $_POST[ 'personalmessage' ] = "I've been using WordPress and thought you might like to try it out. Here's an invitation to create an account."; + $_POST[ 'personalmessage' ] = "I've been using WordPress and thought you might +like to try it out. Here's an invitation to +create an account."; } include('admin-header.php'); diff --git a/wp-inst/wp-content/mu-plugins/invites.php b/wp-inst/wp-content/mu-plugins/invites.php index f75a673..715866e 100644 --- a/wp-inst/wp-content/mu-plugins/invites.php +++ b/wp-inst/wp-content/mu-plugins/invites.php @@ -1,7 +1,7 @@ <?php return; // disable by default. if( substr( $_SERVER[ 'PHP_SELF' ], -14 ) == 'wpmu-admin.php' || substr( $_SERVER[ 'PHP_SELF' ], -11 ) == 'invites.php' ) { - if( '' == get_site_settings( "invites_default_message" ) ) { + if( false == get_site_option( "invites_default_message" ) ) { $msg = "Dear FIRSTNAME LASTNAME, --------------------------------------------- @@ -11,6 +11,7 @@ You have been invited to open a free WordPress weblog. To accept this invitation and register for your weblog, visit REGURL +Your visitor pass is: VISITORPASS This invitation can only be used to set up one weblog. @@ -22,7 +23,7 @@ into the address bar of your browser)."; update_site_settings( "invites_default_message", $msg ); } - if( '' == get_site_settings( "invites_default_subject" ) ) { + if( false == get_site_settings( "invites_default_subject" ) ) { $subject = "FIRSTNAME, USERNAME has invited you to use WordPress"; update_site_settings( "invites_default_subject", $subject ); } |