Changeset 8922
- Timestamp:
- 08/14/2014 08:06:28 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-filters.php
r8743 r8922 251 251 252 252 // Don't touch the email when a user is registered by the site admin 253 if ( is_admin() )253 if ( ( is_admin() || is_network_admin() ) && buddypress()->members->admin->signups_page != get_current_screen()->id ) { 254 254 return $welcome_email; 255 } 256 257 if ( strpos( bp_get_requested_url(), 'wp-activate.php' ) !== false ) { 258 return $welcome_email; 259 } 255 260 256 261 // Don't touch the email if we don't have a custom registration template 257 if ( ! bp_has_custom_signup_page() ) 262 if ( ! bp_has_custom_signup_page() ) { 258 263 return $welcome_email; 264 } 259 265 260 266 // [User Set] Replaces 'PASSWORD' in welcome email; Represents value set by user … … 280 286 function bp_core_filter_blog_welcome_email( $welcome_email, $blog_id, $user_id, $password ) { 281 287 282 // Don't touch the email when a user is registered by the site admin .283 if ( is_admin() )288 // Don't touch the email when a user is registered by the site admin 289 if ( ( is_admin() || is_network_admin() ) && buddypress()->members->admin->signups_page != get_current_screen()->id ) { 284 290 return $welcome_email; 291 } 285 292 286 293 // Don't touch the email if we don't have a custom registration template … … 352 359 function bp_core_activation_signup_user_notification( $user, $user_email, $key, $meta ) { 353 360 361 if ( is_admin() ) { 362 // If the user is created from the WordPress Add User screen, don't send BuddyPress signup notifications 363 if( in_array( get_current_screen()->id, array( 'user', 'user-network' ) ) ) { 364 // If the Super Admin want to skip confirmation email 365 if ( isset( $_POST[ 'noconfirmation' ] ) && is_super_admin() ) { 366 return false; 367 368 // WordPress will manage the signup process 369 } else { 370 return $user; 371 } 372 373 /** 374 * There can be a case where the user was created without the skip confirmation 375 * And the super admin goes in pending accounts to resend it. In this case, as the 376 * meta['password'] is not set, the activation url must be WordPress one 377 */ 378 } else if ( buddypress()->members->admin->signups_page == get_current_screen()->id ) { 379 $is_hashpass_in_meta = maybe_unserialize( $meta ); 380 381 if ( empty( $is_hashpass_in_meta['password'] ) ) { 382 return $user; 383 } 384 } 385 } 386 354 387 // Set up activation link 355 388 $activate_url = bp_get_activation_page() . "?key=$key";
Note: See TracChangeset
for help on using the changeset viewer.