Skip to:
Content

BuddyPress.org

Changeset 11831


Ignore:
Timestamp:
01/28/2018 04:44:23 PM (7 years ago)
Author:
djpaul
Message:

Members, registration: trim whitespace around field values before processing.

Prevents whitespace causing required fields to be skipped on the user registration form.

Fixes #7671

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-members/bp-members-screens.php

    r11773 r11831  
    146146                foreach ( (array) $profile_field_ids as $field_id ) {
    147147                    bp_xprofile_maybe_format_datebox_post_data( $field_id );
     148
     149                    if ( isset( $_POST[ 'field_' . $field_id ] ) ) {
     150                        $_POST[ 'field_' . $field_id ] = trim( $_POST[ 'field_' . $field_id ] );
     151                    }
    148152
    149153                    // Create errors for required fields without values.
Note: See TracChangeset for help on using the changeset viewer.