Forums
-
- Forum
- Posts
-
- Installing BuddyPress
- 23,840
- How-to & Troubleshooting
- 129,881
- Creating & Extending
- 25,910
- Requests & Feedback
- 9,553
- Third Party Plugins
- 9,834
- Showcase
- 3,316
- Ideas
- 1,402
- Miscellaneous
- 9,184
-
The groups_join_group action gets passed the group_id as its first parameter:
e.g. do_action( ‘groups_join_group’, $group_id, $user_id );
So, you have the group_id already.
Interestingly, there doesn’t seem to be a function to get the creator – so, you would then either have to:
Create a new BP_Group instance using the group_id, and directly access the it’s ->creator_id attribute, or
Make a direct SQL call on $bp->groups->table_name to return the creator_id where the id = group_id