You are here

function drupagram_actions_set_status_action_submit in Drupagram 7

Submits the form and sets the drupagram account pulling the data from the drupagram_account table.

File

drupagram_actions/drupagram_actions.module, line 94
Exposes Drupal actions for sending Instagram messages.

Code

function drupagram_actions_set_status_action_submit($form, $form_state) {
  $form_values = $form_state['values'];
  $drupagram_id = db_query("SELECT drupagram_id FROM {drupagram_account} WHERE username = :username", array(
    ':username' => $form_values['username'],
  ))
    ->fetchField();

  // Process the HTML form to store configuration. The keyed array that
  // we return will be serialized to the database.
  $params = array(
    'drupagram_uid' => $drupagram_uid,
    'username' => $form_values['username'],
    'images' => $form_values['images'],
    'caption' => $form_values['caption'],
  );
  return $params;
}