You are here

function _forward_recipient_list in Forward 7.3

3 calls to _forward_recipient_list()
forward_form_submit in ./forward.module
Submit callback function for forward form submit
forward_form_validate in ./forward.module
Validation callback function for forward form submit
forward_js_submit in ./forward.module

File

./forward.module, line 1545
Allows forwarding of entities by email, and provides a record of how often each has been forwarded.

Code

function _forward_recipient_list($form_state) {

  // Process variables for use as tokens.
  $recipients = str_replace(array(
    "\r\n",
    "\n",
    "\r",
  ), ',', $form_state['values']['recipients']);
  $r = array();
  foreach (explode(',', $recipients) as $recipient) {
    if (trim($recipient) != '') {
      $r[trim($recipient)] = TRUE;
    }
  }
  $recipients = array_keys($r);
  $token = array(
    'sender' => $form_state['values']['name'],
    'recipients' => $recipients,
  );
  return array(
    'recipients' => $recipients,
    'token' => $token,
  );
}