Skip to:
Content

BuddyPress.org

Changeset 2583


Ignore:
Timestamp:
02/04/2010 12:10:32 PM (14 years ago)
Author:
apeatling
Message:

Fixes #1802

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-signup.php

    r2576 r2583  
    5353        $bp->signup->email = $_POST['signup_email'];
    5454
    55         /* Now we've checked account details, we can check profile information */
    56         $profile_field_ids = explode( ',', $_POST['signup_profile_field_ids'] );
    57 
    58         /* Loop through the posted fields formatting any datebox values then validate the field */
    59         foreach ( (array) $profile_field_ids as $field_id ) {
    60             if ( !isset( $_POST['field_' . $field_id] ) ) {
    61                 if ( isset( $_POST['field_' . $field_id . '_day'] ) )
    62                     $_POST['field_' . $field_id] = strtotime( $_POST['field_' . $field_id . '_day'] . $_POST['field_' . $field_id . '_month'] . $_POST['field_' . $field_id . '_year'] );
    63             }
    64 
    65             if ( xprofile_check_is_required_field( $field_id ) && empty( $_POST['field_' . $field_id] ) )
    66                 $bp->signup->errors['field_' . $field_id] = __( 'This is a required field', 'buddypress' );
     55        if ( !empty( $_POST['signup_profile_field_ids'] ) && function_exists( 'xprofile_check_is_required_field' ) ) {
     56            /* Now we've checked account details, we can check profile information */
     57            $profile_field_ids = explode( ',', $_POST['signup_profile_field_ids'] );
     58
     59            /* Loop through the posted fields formatting any datebox values then validate the field */
     60            foreach ( (array) $profile_field_ids as $field_id ) {
     61                if ( !isset( $_POST['field_' . $field_id] ) ) {
     62                    if ( isset( $_POST['field_' . $field_id . '_day'] ) )
     63                        $_POST['field_' . $field_id] = strtotime( $_POST['field_' . $field_id . '_day'] . $_POST['field_' . $field_id . '_month'] . $_POST['field_' . $field_id . '_year'] );
     64                }
     65
     66                if ( xprofile_check_is_required_field( $field_id ) && empty( $_POST['field_' . $field_id] ) )
     67                    $bp->signup->errors['field_' . $field_id] = __( 'This is a required field', 'buddypress' );
     68            }
    6769        }
    6870
  • trunk/bp-themes/bp-default/members/index.php

    r2488 r2583  
    3030                            <option value="active"><?php _e( 'Last Active', 'buddypress' ) ?></option>
    3131                            <option value="newest"><?php _e( 'Newest Registered', 'buddypress' ) ?></option>
    32                             <option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ) ?></option>
     32
     33                            <?php if ( bp_is_active( 'xprofile' ) ) : ?>
     34                                <option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ) ?></option>
     35                            <?php endif; ?>
    3336
    3437                            <?php do_action( 'bp_members_directory_order_options' ) ?>
  • trunk/bp-themes/bp-default/registration/register.php

    r2464 r2583  
    4242                    <input type="password" name="signup_password_confirm" id="signup_password_confirm" value="" />
    4343
    44                 </div>
     44                </div><!-- #basic-details-section -->
    4545
    4646                <?php do_action( 'bp_after_account_details_fields' ) ?>
     
    5151                <?php /***** Extra Profile Details ******/ ?>
    5252
     53                <?php if ( bp_is_active( 'xprofile' ) ) : ?>
    5354                <div class="register-section" id="profile-details-section">
    5455
     
    155156                    <input type="hidden" name="signup_profile_field_ids" id="signup_profile_field_ids" value="<?php bp_the_profile_group_field_ids() ?>" />
    156157
    157                 </div>
    158 
    159                 <?php endwhile; endif; endif; ?>
     158                    <?php endwhile; endif; endif; ?>
     159
     160                </div><!-- #profile-details-section -->
     161                <?php endif; ?>
    160162
    161163                <?php do_action( 'bp_after_signup_profile_fields' ) ?>
     
    196198                        </div>
    197199
    198                     </div>
     200                    </div><!-- #blog-details-section -->
    199201
    200202                    <?php do_action( 'bp_after_blog_details_fields' ) ?>
     
    205207
    206208                <div class="submit">
    207                     <input type="submit" name="signup_submit" id="signup_submit" value="<?php _e( 'Complete Sign Up', 'buddypress' ) ?> &rarr;" />
     209                    <input type="submit"name="signup_submit" id="signup_submit" value="<?php _e( 'Complete Sign Up', 'buddypress' ) ?> &rarr;" />
    208210                </div>
    209211
     
    226228                <?php endif; ?>
    227229
    228                 <?php if ( !(int)get_site_option( 'bp-disable-avatar-uploads' ) ) : ?>
     230                <?php if ( bp_is_active( 'xprofile' ) && !(int)get_site_option( 'bp-disable-avatar-uploads' ) ) : ?>
    229231
    230232                    <?php if ( 'upload-image' == bp_get_avatar_admin_step() ) : ?>
Note: See TracChangeset for help on using the changeset viewer.