Skip to:
Content

BuddyPress.org

Opened 2 years ago

Closed 2 years ago

Last modified 4 months ago

#7581 closed enhancement (fixed)

duplicated paramater

Reported by: idofri Owned by: djpaul
Milestone: 3.0 Priority: low
Severity: trivial Version: 2.9.0
Component: Groups Keywords:
Cc:

Description

The requesting user id is being passed twice to the 'groups_membership_requested' action-hook in bp-groups-functions.php @ line 1824:

<?php
do_action( 'groups_membership_requested', $requesting_user_id, $admins, $group_id, $requesting_user->id );

FYI.

Change History (3)

#1 follow-up: @DJPaul
2 years ago

  • Milestone changed from Awaiting Review to 3.0

Hi @idofri
Thanks for reaching out.

I took a look and despite the inline documentation, that last parameter ($requesting_user->id ) is a BP_Groups_Member object, whose id property is the unique ID of the group membership in the database (its primary key). I'll go update the docs now.

#2 @djpaul
2 years ago

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

In 11671:

Groups: fix documentation for groups_membership_requested action.

Fixes #7581

Props idofri

#3 in reply to: ↑ 1 @idofri
2 years ago

Replying to DJPaul:

Hi @idofri
Thanks for reaching out.

I took a look and despite the inline documentation, that last parameter ($requesting_user->id ) is a BP_Groups_Member object, whose id property is the unique ID of the group membership in the database (its primary key). I'll go update the docs now.


https://media.giphy.com/media/xT1XH0lC7yoLLB1BSM/giphy.gif

Note: See TracTickets for help on using tickets.