Skip to:
Content

BuddyPress.org

Changeset 2067 for trunk/bp-groups.php


Ignore:
Timestamp:
11/01/2009 05:56:51 AM (17 years ago)
Author:
johnjamesjacoby
Message:

Fixes #1257 (two new strings added, translations will be needed)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups.php

    r2032 r2067  
    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
    11571163                        /* Check the nonce first. */
    11581164                        if ( !check_admin_referer( 'groups_demote_member' ) )
     
    11731179                if ( 'ban' == $bp->action_variables[1] && is_numeric( $bp->action_variables[2] ) ) {
    11741180                        $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                        }
    11751187
    11761188                        /* Check the nonce first. */
Note: See TracChangeset for help on using the changeset viewer.