Changeset 2075 for branches/1.1/bp-groups.php
- Timestamp:
- 11/02/2009 06:26:55 PM (17 years ago)
- File:
-
- 1 edited
-
branches/1.1/bp-groups.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.1/bp-groups.php
r2032 r2075 545 545 } 546 546 547 /* Group avatar is handled sep erately */547 /* Group avatar is handled separately */ 548 548 if ( 'group-avatar' == $bp->groups->current_create_step && isset( $_POST['upload'] ) ) { 549 549 if ( !empty( $_FILES ) && isset( $_POST['upload'] ) ) { … … 1154 1154 if ( 'demote' == $bp->action_variables[1] && is_numeric( $bp->action_variables[2] ) ) { 1155 1155 $user_id = $bp->action_variables[2]; 1156 1157 /* Check if the user is the group admin first. */ 1158 if ( groups_is_user_admin( $bp->loggedin_user->id, $bp->groups->current_group->id ) ) { 1159 bp_core_add_message( __('As the only group administrator, you cannot demote yourself.', 'buddypress'), 'error' ); 1160 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) ); 1161 } 1156 1162 1157 1163 /* Check the nonce first. */ … … 1174 1180 $user_id = $bp->action_variables[2]; 1175 1181 1182 /* Check if the user is the group admin first. */ 1183 if ( groups_is_user_admin( $bp->loggedin_user->id, $bp->groups->current_group->id ) ) { 1184 bp_core_add_message( __('As the only group administrator, you cannot ban yourself.', 'buddypress'), 'error' ); 1185 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) ); 1186 } 1187 1176 1188 /* Check the nonce first. */ 1177 1189 if ( !check_admin_referer( 'groups_ban_member' ) )
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)