Changeset 5764
- Timestamp:
- 02/13/2012 08:31:40 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-loader.php
r5758 r5764 175 175 if ( bp_is_groups_component() && !empty( $this->current_group ) ) { 176 176 if ( !$this->current_group->user_has_access ) { 177 178 // Hidden groups should return a 404 for non-members. 179 // Unset the current group so that you're not redirected 180 // to the default group tab 177 181 if ( 'hidden' == $this->current_group->status ) { 178 // Hidden groups should return a 404 for non-members.179 // Unset the current group so that you're not redirected180 // to the default group tab181 182 $this->current_group = 0; 182 183 $bp->is_single_item = false; 183 184 bp_do_404(); 184 185 return; 185 } elseif ( !bp_is_current_action( 'home' ) ) { 186 187 // Skip the no_access check on home and membership request pages 188 } elseif ( !bp_is_current_action( 'home' ) && !bp_is_current_action( 'request-membership' ) ) { 189 190 // Off-limits to this user. Throw an error and redirect to the group's home page 186 191 if ( is_user_logged_in() ) { 187 // Off-limits to this user. Throw an error and redirect to the group's home page188 192 bp_core_no_access( array( 189 193 'message' => __( 'You do not have access to this group.', 'buddypress' ), … … 191 195 'redirect' => false 192 196 ) ); 197 198 // User does not have access, and does not get a message 193 199 } else { 194 // Allow the user to log in195 200 bp_core_no_access(); 196 201 }
Note: See TracChangeset
for help on using the changeset viewer.