Skip to:
Content

BuddyPress.org

Changeset 2107


Ignore:
Timestamp:
11/24/2009 02:16:46 PM (16 years ago)
Author:
apeatling
Message:

These checks are stopping demotion/banning of any user in a group. Fixes #1334

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.1/bp-groups.php

    r2100 r2107  
    11551155            $user_id = $bp->action_variables[2];
    11561156
    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 
    11631157            /* Check the nonce first. */
    11641158            if ( !check_admin_referer( 'groups_demote_member' ) )
     
    11791173        if ( 'ban' == $bp->action_variables[1] && is_numeric( $bp->action_variables[2] ) ) {
    11801174            $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             }
    11871175
    11881176            /* Check the nonce first. */
Note: See TracChangeset for help on using the changeset viewer.