You are here

function og_ui_confirm_unsubscribe_submit in Organic groups 7

Same name and namespace in other branches
  1. 7.2 og_ui/og_ui.pages.inc \og_ui_confirm_unsubscribe_submit()

Submit handler; Confirm OG unsubscription.

File

og_ui/og_ui.pages.inc, line 218
Page callbacks for Group module.

Code

function og_ui_confirm_unsubscribe_submit($form, &$form_state) {
  $group = $form_state['values']['group'];
  $account = $form_state['values']['account'];
  og_ungroup($group->gid, 'user', $account);

  // TODO: Determine where to go next - Group if accessible, or else site front
  // page.
  $form_state['redirect'] = "{$group->entity_type}/{$group->etid}";
}