#6031 closed enhancement (fixed)
Allow `bp_groups_user_can_send_invites()` to accept a user ID
Reported by: | dcavins | Owned by: | r-a-y |
---|---|---|---|
Milestone: | 2.2 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Groups | Keywords: | has-patch |
Cc: |
Description
As it functions now, bp_groups_user_can_send_invites()
only tests against the logged-in user. It would be useful in some instances (like when an admin is admin-ing a group) to be able to pass it a user_id to check specifically.
I made this change in #6025 as a necessary change for error-checking in groups_send_invites()
, but realize that this may be easier to deal with in a smaller chunk.
Attachments (2)
Change History (8)
This ticket was mentioned in Slack in #buddypress by dcavins. View the logs.
10 years ago
This ticket was mentioned in Slack in #buddypress by mamaduka. View the logs.
10 years ago
#4
@
10 years ago
- Owner set to r-a-y
- Resolution set to fixed
- Status changed from new to closed
In 9293:
#5
@
10 years ago
Hi r-a-y-
Thanks very much for making improvements to the patch and committing it. Upon reading over the change set, I realized that I had missed a basic test case in the unit tests: non-members.
I've added a patch that covers this case and also tweaks the "current group" test.
Thanks again for sponsoring this patch.
Add
$user_id
parameter tobp_groups_user_can_send_invites()