Skip to:
Content

BuddyPress.org

#7593 closed defect (bug) (fixed)

Additional groups on registration, error on signup

Reported by: devitate Owned by: slaFFik
Milestone: 3.0 Priority: high
Severity: normal Version:
Component: Administration Keywords: dev-feedback
Cc:

Description

When I add a group other than 1, to the registration, the signups page errors because they are not available fields in the loop. I found lines aprx #2045 - 55 of class-bp-members-admin.php, it only seems to reference 1 group. Would it be easier to just loop through all the groups like?

$field_groups = bp_xprofile_get_groups( array(
 'profile_group_id' => 1,
 'exclude_fields' => 1,
 'update_meta_cache' => false,
 'fetch_fields' => true,
));

foreach( $field_groups as $fg ) {
   foreach( $fg->fields as $f ) {
       $fdata[ $f->id ] = $f->name;
  }
}

/*
  $fields = $fields[0]->fields;
  foreach( $fields as $f ) {
     $fdata[ $f->id ] = $f->name;
  }
*/

Change History (3)

#1 @DJPaul
21 months ago

  • Milestone changed from Awaiting Review to 3.0

Good find @devitate :)

@r-a-y I think it was you? who worked on this part of the wp-admin signups management screen last. At a quick look, I think this is a good way to fix this, but have you any insight?

#2 @DJPaul
18 months ago

Could probably do some UI work to draw multiple tables (one for each field group), but this a good-enough minimum fix to put in.

#3 @djpaul
18 months ago

  • Resolution set to fixed
  • Status changed from new to closed

In 11798:

Members, Admin: show user signup fields from all profile field groups.

Fixes #7593

Props devitate

Note: See TracTickets for help on using tickets.