You are here

function multiple_email_install in Multiple E-mail Addresses 7

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

Implements hook_install().

Imports current users' emails.

File

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

Code

function multiple_email_install() {
  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  ");
}