You are here

function _invite_validate_emails in Invite 7.2

Same name and namespace in other branches
  1. 5.2 invite.module \_invite_validate_emails()
  2. 5 invite.module \_invite_validate_emails()
  3. 6.2 invite.module \_invite_validate_emails()

File

./invite.module, line 1441
Allows your users to send and track invitations to join your site.

Code

function _invite_validate_emails($sql, &$emails) {
  $failed_emails = array();

  // Build query arguments.
  $args = func_get_args();
  $args = array_merge($emails, array_slice($args, 2));
  $result = db_query($sql, $args);
  while ($row = db_fetch_object($result)) {
    $failed_emails[] = $row->email;
  }

  // Keep only valid e-mails.
  $emails = array_diff($emails, $failed_emails);
  return $failed_emails;
}