#6031 closed enhancement (fixed)
Allow `bp_groups_user_can_send_invites()` to accept a user ID
| Reported by: | dcavins | Owned by: | r-a-y |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.2 |
| Component: | Groups | Version: | |
| Severity: | normal | 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.
12 years ago
This ticket was mentioned in Slack in #buddypress by mamaduka. View the logs.
12 years ago
#5
@
12 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Add
$user_idparameter tobp_groups_user_can_send_invites()