sharedemail.install in Shared Email 5
File
sharedemail.install
View source
<?php
function sharedemail_install() {
$msg = t('WARNING: The e-mail address you are using, has already been registered on this site by another user. ' . 'You should be aware that personal information such as password resets will be sent to this address. ' . 'We strongly recommend changing your registered address to a different e-mail address. ' . 'You can do this at any time from your account page when you login.');
variable_set('sharedemail_msg', $msg);
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
case 'pgsql':
db_query("UPDATE {system} SET weight = -99 WHERE name = 'sharedemail'");
$success = TRUE;
break;
default:
drupal_set_message(t('Unsupported Database.'));
break;
}
if ($success) {
drupal_set_message(t('The Shared E-mail module has been installed successfully'));
}
else {
drupal_set_message(t('Installation of Shared E-mail was unsuccessful.'), 'error');
}
}
function sharedemail_uninstall() {
variable_del('sharedemail_msg');
}