Changeset 2954
- Timestamp:
- 04/26/2010 11:43:08 PM (16 years ago)
- File:
-
- 1 edited
-
branches/1.2/bp-groups.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2/bp-groups.php
r2933 r2954 1185 1185 return false; 1186 1186 1187 // user wants to join a group1187 // Skip if banned or already a member 1188 1188 if ( !groups_is_user_member( $bp->loggedin_user->id, $bp->groups->current_group->id ) && !groups_is_user_banned( $bp->loggedin_user->id, $bp->groups->current_group->id ) ) { 1189 if ( !groups_join_group($bp->groups->current_group->id) ) { 1190 bp_core_add_message( __('There was an error joining the group.', 'buddypress'), 'error' ); 1191 } else { 1192 bp_core_add_message( __('You joined the group!', 'buddypress') ); 1193 } 1189 1190 // User wants to join a group that is not public 1191 if ( $bp->groups->current_group->status != 'public' ) { 1192 if ( !groups_check_user_has_invite( $bp->loggedin_user->id, $bp->groups->current_group->id ) ) { 1193 bp_core_add_message( __( 'There was an error joining the group.', 'buddypress' ), 'error' ); 1194 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) ); 1195 } 1196 } 1197 1198 // User wants to join any group 1199 if ( !groups_join_group( $bp->groups->current_group->id ) ) 1200 bp_core_add_message( __( 'There was an error joining the group.', 'buddypress' ), 'error' ); 1201 else 1202 bp_core_add_message( __( 'You joined the group!', 'buddypress' ) ); 1203 1194 1204 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) ); 1195 1205 }
Note: See TracChangeset
for help on using the changeset viewer.