You are here

function drupagram_account_list_form_submit in Drupagram 6

Same name and namespace in other branches
  1. 7 drupagram.pages.inc \drupagram_account_list_form_submit()

File

./drupagram.pages.inc, line 346
Provieds drupagram forms.

Code

function drupagram_account_list_form_submit($form, &$form_state) {
  $accounts = $form_state['values']['accounts'];
  foreach ($accounts as $account) {
    if (empty($account['delete'])) {
      drupagram_account_save($account);
      drupal_set_message(t('The Instagram account settings were updated.'));
    }
    else {
      drupagram_account_delete($account['id']);
      drupal_set_message(t('The Instagram account was deleted.'));
    }
  }
}