Changeset 2635 for trunk/bp-core/bp-core-activation.php
- Timestamp:
- 02/08/2010 04:24:52 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/bp-core/bp-core-activation.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-activation.php
r2617 r2635 83 83 * email address is no longer necessary. It's also a terrible idea security wise. 84 84 * 85 * The only exception to this is when an admin has generated an account for a user. 86 * 85 87 * This will only disable the email if a custom registration template is being used. 86 88 */ … … 91 93 return false; 92 94 } 93 add_filter( 'wpmu_welcome_user_notification', 'bp_core_disable_welcome_email' ); 95 if ( !is_admin() && empty( $_GET['e'] ) ) 96 add_filter( 'wpmu_welcome_user_notification', 'bp_core_disable_welcome_email' ); 94 97 95 98 // Notify user of signup success. … … 116 119 return false; 117 120 } 118 add_filter( 'wpmu_signup_blog_notification', 'bp_core_activation_signup_blog_notification', 1, 7 ); 121 if ( !is_admin() ) 122 add_filter( 'wpmu_signup_blog_notification', 'bp_core_activation_signup_blog_notification', 1, 7 ); 119 123 120 124 function bp_core_activation_signup_user_notification( $user, $user_email, $key, $meta ) { … … 128 132 $admin_email = 'support@' . $_SERVER['SERVER_NAME']; 129 133 134 /* If this is an admin generated activation, add a param to email the user login details */ 135 if ( is_admin() ) 136 $email = '&e=1'; 137 130 138 $from_name = ( '' == get_site_option( "site_name" ) ) ? 'WordPress' : wp_specialchars( get_site_option( "site_name" ) ); 131 139 $message_headers = "MIME-Version: 1.0\n" . "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n"; 132 $message = sprintf( __( "Thanks for registering! To complete the activation of your account please click the following link:\n\n%s\n\n", 'buddypress' ), $activate_url , clean_url("http://{$domain}{$path}" ) );140 $message = sprintf( __( "Thanks for registering! To complete the activation of your account please click the following link:\n\n%s\n\n", 'buddypress' ), $activate_url . $email, clean_url("http://{$domain}{$path}" ) ); 133 141 $subject = '[' . $from_name . '] ' . __( 'Activate Your Account', 'buddypress' ); 134 142 … … 138 146 return false; 139 147 } 140 add_filter( 'wpmu_signup_user_notification', 'bp_core_activation_signup_user_notification', 1, 4 ); 148 if ( !is_admin() || ( is_admin() && empty( $_POST['noconfirmation'] ) ) ) 149 add_filter( 'wpmu_signup_user_notification', 'bp_core_activation_signup_user_notification', 1, 4 ); 141 150 142 151 ?>
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)