bp_groupblog_member_join

Bp_groupblog_member_join( $group_id ).

Description

bp_groupblog_member_join( $group_id ); 

Runs whenever member permissions are changed and saved - by Boone

Parameters (1)

0. $group_id
The group id.

Usage

  1. if ( !function_exists( 'bp_groupblog_member_join' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bp-groupblog/bp-groupblog.php'; 
  3.  
  4. // The group id. 
  5. $group_id = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_groupblog_member_join($group_id); 
  9.  

Defined (1)

The function is defined in the following location(s).

/bp-groupblog.php  
  1. function bp_groupblog_member_join( $group_id ) { 
  2. $params = array( 
  3. 'exclude_admins_mods' => 0,  
  4. 'per_page' => 10000,  
  5. 'group_id' => $group_id 
  6. ); 
  7.  
  8. if ( bp_group_has_members( $params ) ) { 
  9. $blog_id = groups_get_groupmeta( $group_id, 'groupblog_blog_id' ); 
  10. $group = groups_get_group( array( 'group_id' => $group_id ) ); 
  11.  
  12. while ( bp_group_members() ) { 
  13. bp_group_the_member(); 
  14. $user_id = bp_get_group_member_id(); 
  15.  
  16. if ( $group->creator_id != $user_id ) 
  17. bp_groupblog_upgrade_user( $user_id, $group_id, $blog_id );