Skip to:
Content

BuddyPress.org

Changeset 2635


Ignore:
Timestamp:
02/08/2010 04:24:52 PM (15 years ago)
Author:
apeatling
Message:

Fixes #1854

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core.php

    r2631 r2635  
    20532053    global $bp;
    20542054
    2055     if ( false === strpos( wp_get_referer(), 'wp-login.php' ) && empty( $_REQUEST['nr'] ) )
     2055    if ( false === strpos( wp_get_referer(), 'wp-login.php' ) && false === strpos( wp_get_referer(), 'activate' ) && empty( $_REQUEST['nr'] ) )
    20562056        return wp_get_referer();
    20572057
  • trunk/bp-core/bp-core-activation.php

    r2617 r2635  
    8383 * email address is no longer necessary. It's also a terrible idea security wise.
    8484 *
     85 * The only exception to this is when an admin has generated an account for a user.
     86 *
    8587 * This will only disable the email if a custom registration template is being used.
    8688 */
     
    9193    return false;
    9294}
    93 add_filter( 'wpmu_welcome_user_notification', 'bp_core_disable_welcome_email' );
     95if ( !is_admin() && empty( $_GET['e'] ) )
     96    add_filter( 'wpmu_welcome_user_notification', 'bp_core_disable_welcome_email' );
    9497
    9598// Notify user of signup success.
     
    116119    return false;
    117120}
    118 add_filter( 'wpmu_signup_blog_notification', 'bp_core_activation_signup_blog_notification', 1, 7 );
     121if ( !is_admin() )
     122    add_filter( 'wpmu_signup_blog_notification', 'bp_core_activation_signup_blog_notification', 1, 7 );
    119123
    120124function bp_core_activation_signup_user_notification( $user, $user_email, $key, $meta ) {
     
    128132        $admin_email = 'support@' . $_SERVER['SERVER_NAME'];
    129133
     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
    130138    $from_name = ( '' == get_site_option( "site_name" ) ) ? 'WordPress' : wp_specialchars( get_site_option( "site_name" ) );
    131139    $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}" ) );
    133141    $subject = '[' . $from_name . '] ' . __( 'Activate Your Account', 'buddypress' );
    134142
     
    138146    return false;
    139147}
    140 add_filter( 'wpmu_signup_user_notification', 'bp_core_activation_signup_user_notification', 1, 4 );
     148if ( !is_admin() || ( is_admin() && empty( $_POST['noconfirmation'] ) ) )
     149    add_filter( 'wpmu_signup_user_notification', 'bp_core_activation_signup_user_notification', 1, 4 );
    141150
    142151?>
  • trunk/bp-themes/bp-default/functions.php

    r2629 r2635  
    208208function bp_dtheme_show_notice() { ?>
    209209    <div id="message" class="updated fade">
    210         <p><?php printf( __( 'Theme activated! This theme contains <a href="%s">customization options</a> and <a href="%s">custom header image</a> support. <a href="%s">Sidebar widgets</a> are also supported.', 'buddypress' ), admin_url( 'themes.php?page=theme-options-page' ), admin_url( 'themes.php?page=custom-header' ), admin_url( 'widgets.php' ) ) ?></p>
     210        <p><?php printf( __( 'Theme activated! This theme contains <a href="%s">custom header image</a> support and <a href="%s">sidebar widgets</a>.', 'buddypress' ), admin_url( 'themes.php?page=custom-header' ), admin_url( 'widgets.php' ) ) ?></p>
    211211    </div>
    212212
  • trunk/bp-themes/bp-default/registration/activate.php

    r2284 r2635  
    1818                <?php do_action( 'bp_before_activate_content' ) ?>
    1919
    20                 <p><?php _e( 'Your account was activated successfully! You can now log in with the username and password you provided when you signed up.', 'buddypress' ) ?></p>
    21 
     20                <?php if ( isset( $_GET['e'] ) ) : ?>
     21                    <p><?php _e( 'Your account was activated successfully! Your account details have been sent to you in a separate email.', 'buddypress' ) ?></p>
     22                <?php else : ?>
     23                    <p><?php _e( 'Your account was activated successfully! You can now log in with the username and password you provided when you signed up.', 'buddypress' ) ?></p>
     24                <?php endif; ?>
    2225
    2326            <?php else : ?>
  • trunk/bp-xprofile/bp-xprofile-templatetags.php

    r2368 r2635  
    454454
    455455                /* Check for updated posted values, but errors preventing them from being saved first time */
    456                 if ( isset( $_POST['field_' . $field->id . '_day'] ) && $day != $_POST['field_' . $field->id . '_day'] ) {
    457                     if ( !empty( $_POST['field_' . $field->id . '_day'] ) )
     456                if ( !empty( $_POST['field_' . $field->id . '_day'] ) ) {
     457                    if ( $day != $_POST['field_' . $field->id . '_day'] )
    458458                        $day = $_POST['field_' . $field->id . '_day'];
    459459                }
    460460
    461                 if ( isset( $_POST['field_' . $field->id . '_month'] ) && $month != $_POST['field_' . $field->id . '_month'] ) {
    462                     if ( !empty( $_POST['field_' . $field->id . '_month'] ) )
     461                if ( !empty( $_POST['field_' . $field->id . '_month'] ) ) {
     462                    if ( $month != $_POST['field_' . $field->id . '_month'] )
    463463                        $month = $_POST['field_' . $field->id . '_month'];
    464464                }
    465465
    466                 if ( isset( $_POST['field_' . $field->id . '_year'] ) && $year != date("j", $_POST['field_' . $field->id . '_year'] ) ) {
    467                     if ( !empty( $_POST['field_' . $field->id . '_year'] ) )
     466                if ( !empty( $_POST['field_' . $field->id . '_year'] ) ) {
     467                    if ( $year != date( "j", $_POST['field_' . $field->id . '_year'] ) )
    468468                        $year = $_POST['field_' . $field->id . '_year'];
    469469                }
Note: See TracChangeset for help on using the changeset viewer.