Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/02/2009 06:26:55 PM (17 years ago)
Author:
apeatling
Message:

Applying jjj trunk fixes to 1.1 branch.

File:
1 edited

Legend:

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

    r2032 r2075  
    545545        }
    546546       
    547         /* Group avatar is handled seperately */
     547        /* Group avatar is handled separately */
    548548        if ( 'group-avatar' == $bp->groups->current_create_step && isset( $_POST['upload'] ) ) {
    549549                if ( !empty( $_FILES ) && isset( $_POST['upload'] ) ) {
     
    11541154                if ( 'demote' == $bp->action_variables[1] && is_numeric( $bp->action_variables[2] ) ) {
    11551155                        $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                        }               
    11561162
    11571163                        /* Check the nonce first. */
     
    11741180                        $user_id = $bp->action_variables[2];
    11751181
     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                       
    11761188                        /* Check the nonce first. */
    11771189                        if ( !check_admin_referer( 'groups_ban_member' ) )
Note: See TracChangeset for help on using the changeset viewer.