You are here

function og_remove_admin_confirm_submit in Organic groups 6

Same name and namespace in other branches
  1. 5.8 og.module \og_remove_admin_confirm_submit()
  2. 5 og.module \og_remove_admin_confirm_submit()
  3. 5.2 og.module \og_remove_admin_confirm_submit()
  4. 5.3 og.module \og_remove_admin_confirm_submit()
  5. 5.7 og.module \og_remove_admin_confirm_submit()
  6. 6.2 og.pages.inc \og_remove_admin_confirm_submit()

Confirm og remove admin form

File

./og.module, line 840

Code

function og_remove_admin_confirm_submit($form, &$form_state) {
  $account = $form_state['values']['account'];
  $gid = $form_state['values']['gid'];
  og_save_subscription($gid, $account->uid, array(
    'is_admin' => 0,
  ));
  drupal_set_message(t('%name is no longer a <em>group administrator</em>.', array(
    '%name' => $account->name,
  )));
  $form_state['redirect'] = "og/users/{$gid}";
}