You are here

function multiple_email_install in Multiple E-mail Addresses 6

Same name and namespace in other branches
  1. 5 multiple_email.install \multiple_email_install()
  2. 7 multiple_email.install \multiple_email_install()
  3. 2.x multiple_email.install \multiple_email_install()

Implementation of hook_install().

File

./multiple_email.install, line 11
Install file for multiple_email module

Code

function multiple_email_install() {
  drupal_install_schema('multiple_email');

  // Now import current users' emails.
  db_query("\n    INSERT INTO {multiple_email}\n      (uid, email, time_registered, confirmed)\n    SELECT\n      uid,\n      mail,\n      created,\n      1\n    FROM {users}\n    WHERE uid != 0\n    AND mail != ''\n    GROUP BY mail\n  ");
}