Changeset 2067
- Timestamp:
- 11/01/2009 05:56:51 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups.php
r2032 r2067 1155 1155 $user_id = $bp->action_variables[2]; 1156 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 } 1162 1157 1163 /* Check the nonce first. */ 1158 1164 if ( !check_admin_referer( 'groups_demote_member' ) ) … … 1173 1179 if ( 'ban' == $bp->action_variables[1] && is_numeric( $bp->action_variables[2] ) ) { 1174 1180 $user_id = $bp->action_variables[2]; 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 } 1175 1187 1176 1188 /* Check the nonce first. */
Note: See TracChangeset
for help on using the changeset viewer.