Changeset 2107
- Timestamp:
- 11/24/2009 02:16:46 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.1/bp-groups.php
r2100 r2107 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 1163 1157 /* Check the nonce first. */ 1164 1158 if ( !check_admin_referer( 'groups_demote_member' ) ) … … 1179 1173 if ( 'ban' == $bp->action_variables[1] && is_numeric( $bp->action_variables[2] ) ) { 1180 1174 $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 }1187 1175 1188 1176 /* Check the nonce first. */
Note: See TracChangeset
for help on using the changeset viewer.