Changeset 4324 for trunk/bp-groups/bp-groups-functions.php
- Timestamp:
- 05/02/2011 08:55:26 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-functions.php
r4230 r4324 525 525 return false; 526 526 527 if ( !groups_is_user_member( $user_id, $group_id ) && !groups_check_user_has_invite( $user_id, $group_id ) ) {527 if ( !groups_is_user_member( $user_id, $group_id ) && !groups_check_user_has_invite( $user_id, $group_id, 'all' ) ) { 528 528 $invite = new BP_Groups_Member; 529 529 $invite->group_id = $group_id; … … 628 628 } 629 629 630 function groups_check_user_has_invite( $user_id, $group_id ) { 631 return BP_Groups_Member::check_has_invite( $user_id, $group_id ); 630 /** 631 * Check to see whether a user has already been invited to a group 632 * 633 * By default, the function checks for invitations that have been sent. Entering 'all' as the $type 634 * parameter will return unsent invitations as well (useful to make sure AJAX requests are not 635 * duplicated) 636 * 637 * @package BuddyPress Groups 638 * 639 * @param int $user_id Potential group member 640 * @param int $group_id Potential group 641 * @param str $type Optional. Use 'sent' to check for sent invites, 'all' to check for all 642 * @return bool Returns true if an invitation is found 643 */ 644 function groups_check_user_has_invite( $user_id, $group_id, $type = 'sent' ) { 645 return BP_Groups_Member::check_has_invite( $user_id, $group_id, $type ); 632 646 } 633 647
Note: See TracChangeset
for help on using the changeset viewer.