Skip to:
Content

Opened 7 months ago

Closed 5 months ago

#7641 closed enhancement (fixed)

Add "IDs only" return format option for BP_Signup::get().

Reported by: espellcaste Owned by: espellcaste
Milestone: 3.0 Priority: normal
Severity: normal Version:
Component: Members Keywords: has-patch has-unit-tests
Cc:

Description

Inspired by #7609. I think BP_Signup::get() could use an update for fetching ids only.

Patch in the works.

Attachments (2)

7641-1 (7.5 KB) - added by espellcaste 7 months ago.
7641-2.patch (7.5 KB) - added by espellcaste 7 months ago.
Correct one!

Download all attachments as: .zip

Change History (8)

@espellcaste
7 months ago

@espellcaste
7 months ago

Correct one!

#1 @DJPaul
6 months ago

  • Owner set to espellcaste
  • Status changed from new to assigned

#2 @DJPaul
6 months ago

While we're changing this code:

 $signup->id   = intval( $signup->signup_id );

Can you please look into why this value is not being returned as an integer? Is it a bug somewhere else (our code, or WP's)?

#3 @DJPaul
6 months ago

Apart from that small question, I think this patch is looking fine! 👍

#4 @espellcaste
6 months ago

  • Component changed from (not sure) to Members
  • Keywords has-patch has-unit-tests added; needs-patch needs-unit-tests removed
  • Type changed from defect (bug) to enhancement

@DJPaul I'm not sure where to look. I looked at how it is added and don't see a problem there. I'll defer this question to @boonebgorges, he is well versed in BP_Signup than me and probably will answer better.

So far, I presume whoever did that wanna just to ensure it is an integer.

--

About the patch, great! :)

#5 @boonebgorges
6 months ago

Can you please look into why this value is not being returned as an integer?

$signup is a row pulled from a $wpdb->get_results() database query. $wpdb->get_results() results are always arrays/objects with string values. https://buddypress.trac.wordpress.org/browser/tags/2.9.2/src/bp-members/classes/class-bp-signup.php?marks=210,222#L200

#6 @djpaul
5 months ago

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

In 11804:

Members: add "IDs only" return format option for BP_Signup::get().

Fixes #7641

Props espellcaste

Note: See TracTickets for help on using tickets.