Changeset 1970 for trunk/bp-core/bp-core-activation.php
- Timestamp:
- 09/28/2009 01:02:12 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-activation.php
r1905 r1970 78 78 * Since the user now chooses their password, sending it over clear-text to an 79 79 * email address is no longer necessary. It's also a terrible idea security wise. 80 * 81 * This will only disable the email if a custom registration template is being used. 80 82 */ 81 83 function bp_core_disable_welcome_email() { 84 if ( '' == locate_template( array( 'registration/register.php' ), false ) && '' == locate_template( array( 'register.php' ), false ) ) 85 return true; 86 82 87 return false; 83 88 } 84 89 add_filter( 'wpmu_welcome_user_notification', 'bp_core_disable_welcome_email' ); 85 90 91 /*** 92 * bp_core_filter_activation_email() 93 * 94 * Filter the activation email to remove the line stating that another email will be sent 95 * with the generated login details. This is not the case due to bp_core_disable_welcome_email() 96 */ 97 function bp_core_filter_activation_email( $email ) { 98 if ( '' == locate_template( array( 'registration/register.php' ), false ) && '' == locate_template( array( 'register.php' ), false ) ) 99 return $email; 100 101 return str_replace( __( 'After you activate, you will receive *another email* with your login.', 'buddypress' ), '', $email ); 102 } 103 add_filter( 'wpmu_signup_user_notification_email', 'bp_core_filter_activation_email' ); 104 add_filter( 'wpmu_signup_blog_notification_email', 'bp_core_filter_activation_email' ); 105 86 106 ?>
Note: See TracChangeset
for help on using the changeset viewer.