Changeset 2339 for trunk/bp-groups.php
- Timestamp:
- 01/18/2010 03:52:16 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups.php
r2332 r2339 2261 2261 /*** Group Invitations *********************************************************/ 2262 2262 2263 function groups_get_invites_for_user( $user_id = false ) {2263 function groups_get_invites_for_user( $user_id = false, $limit = false, $page = false ) { 2264 2264 global $bp; 2265 2265 … … 2267 2267 $user_id = $bp->loggedin_user->id; 2268 2268 2269 return BP_Groups_Member::get_invites( $user_id );2269 return BP_Groups_Member::get_invites( $user_id, $limit, $page ); 2270 2270 } 2271 2271 … … 2287 2287 return false; 2288 2288 2289 if ( groups_is_user_member( $user_id, $group_id ) ) 2290 return false; 2291 2292 $invite = new BP_Groups_Member; 2293 $invite->group_id = $group_id; 2294 $invite->user_id = $user_id; 2295 $invite->date_modified = $date_modified; 2296 $invite->inviter_id = $inviter_id; 2297 $invite->is_confirmed = $is_confirmed; 2298 2299 if ( !$invite->save() ) 2300 return false; 2301 2302 do_action( 'groups_invite_user', $args ); 2289 if ( !groups_is_user_member( $user_id, $group_id ) && !groups_check_user_has_invite( $user_id, $group_id ) ) { 2290 $invite = new BP_Groups_Member; 2291 $invite->group_id = $group_id; 2292 $invite->user_id = $user_id; 2293 $invite->date_modified = $date_modified; 2294 $invite->inviter_id = $inviter_id; 2295 $invite->is_confirmed = $is_confirmed; 2296 2297 if ( !$invite->save() ) 2298 return false; 2299 2300 do_action( 'groups_invite_user', $args ); 2301 } 2303 2302 2304 2303 return true;
Note: See TracChangeset
for help on using the changeset viewer.