You are here

function email_verify_checkall in Email Verify 7

Same name and namespace in other branches
  1. 5 email_verify.module \email_verify_checkall()
  2. 6 email_verify.check.inc \email_verify_checkall()

Menu callback; look though the whole user base for invalid emails.

Can be very long when hosts timeout.

1 string reference to 'email_verify_checkall'
email_verify_menu in ./email_verify.module
Implements hook_menu().

File

./email_verify.check.inc, line 12
User email check menu callback file for email_verify module.

Code

function email_verify_checkall() {
  $header = array(
    'User Id',
    'Name',
    'Email',
  );
  $rows = array();
  $results = db_select('users', 'u')
    ->fields('u', array(
    'uid',
    'name',
    'mail',
  ))
    ->execute();
  foreach ($results as $row) {
    if (email_verify_check($row->mail)) {
      $link = l($row->name, 'user/' . $row->uid);
      $rows[] = array(
        $row->uid,
        $link,
        $row->mail,
      );
    }
  }
  return theme('table', array(
    'header' => $header,
    'rows' => $rows,
  ));
}