Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/11/2010 04:52:34 PM (15 years ago)
Author:
apeatling
Message:

Fixes #2149, fixed inconsistencies between single WP and WPMU with registration and activation. Single WP users must now activate their accounts and confirm they are using a valid email.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/bp-core/bp-core-templatetags.php

    r2820 r2832  
    11841184        extract( $r, EXTR_SKIP );
    11851185
    1186         if ( !bp_core_is_multisite() && !empty( $_POST['signup_username'] ) ) {
    1187             $user_id = bp_core_get_userid( $_POST['signup_username'] );
    1188             return apply_filters( 'bp_get_signup_avatar', bp_core_fetch_avatar( array( 'item_id' => $user_id, 'type' => 'full', 'width' => $size, 'height' => $size, 'alt' => $alt, 'class' => $class ) ) );
     1186        $signup_avatar_dir = ( !empty( $_POST['signup_avatar_dir'] ) ) ? $_POST['signup_avatar_dir'] : $bp->signup->avatar_dir;
     1187
     1188        if ( empty( $signup_avatar_dir ) ) {
     1189            if ( empty( $bp->grav_default->user ) ) {
     1190                $default_grav = 'wavatar';
     1191            } else if ( 'mystery' == $bp->grav_default->user ) {
     1192                $default_grav = BP_PLUGIN_URL . '/bp-core/images/mystery-man.jpg';
     1193            } else {
     1194                $default_grav = $bp->grav_default->user;
     1195            }
     1196
     1197            $gravatar_url = apply_filters( 'bp_gravatar_url', 'http://www.gravatar.com/avatar/' );
     1198            return apply_filters( 'bp_get_signup_avatar', '<img src="' . $gravatar_url . md5( $_POST['signup_email'] ) . '?d=' . $default_grav . '&amp;s=' . $size ) . '" width="' . $size . '" height="' . $size . '" alt="' . $alt . '" class="' . $class . '" />';
    11891199        } else {
    1190             $signup_avatar_dir = ( !empty( $_POST['signup_avatar_dir'] ) ) ? $_POST['signup_avatar_dir'] : $bp->signup->avatar_dir;
    1191 
    1192             if ( empty( $signup_avatar_dir ) ) {
    1193                 if ( empty( $bp->grav_default->user ) ) {
    1194                     $default_grav = 'wavatar';
    1195                 } else if ( 'mystery' == $bp->grav_default->user ) {
    1196                     $default_grav = BP_PLUGIN_URL . '/bp-core/images/mystery-man.jpg';
    1197                 } else {
    1198                     $default_grav = $bp->grav_default->user;
    1199                 }
    1200 
    1201                 $gravatar_url = apply_filters( 'bp_gravatar_url', 'http://www.gravatar.com/avatar/' );
    1202                 return apply_filters( 'bp_get_signup_avatar', '<img src="' . $gravatar_url . md5( $_POST['signup_email'] ) . '?d=' . $default_grav . '&amp;s=' . $size ) . '" width="' . $size . '" height="' . $size . '" alt="' . $alt . '" class="' . $class . '" />';
    1203             } else {
    1204                 return apply_filters( 'bp_get_signup_avatar', bp_core_fetch_avatar( array( 'item_id' => $signup_avatar_dir, 'object' => 'signup', 'avatar_dir' => 'avatars/signups', 'type' => 'full', 'width' => $size, 'height' => $size, 'alt' => $alt, 'class' => $class ) ) );
    1205             }
     1200            return apply_filters( 'bp_get_signup_avatar', bp_core_fetch_avatar( array( 'item_id' => $signup_avatar_dir, 'object' => 'signup', 'avatar_dir' => 'avatars/signups', 'type' => 'full', 'width' => $size, 'height' => $size, 'alt' => $alt, 'class' => $class ) ) );
    12061201        }
    12071202    }
     
    12461241
    12471242function bp_registration_needs_activation() {
    1248     return apply_filters( 'bp_registration_needs_activation', bp_core_is_multisite() );
     1243    return apply_filters( 'bp_registration_needs_activation', true );
    12491244}
    12501245
Note: See TracChangeset for help on using the changeset viewer.