function multiple_email_delete_page in Multiple E-mail Addresses 5
Shows confirmation that you want to delete the specified email address
If the second argument is true, then it will just go ahead and delete.
Parameters
integer $eid: ID of the email to be deleted
Return value
string
1 string reference to 'multiple_email_delete_page'
- multiple_email_menu in ./
multiple_email.module - Implementation of hook_menu()
File
- ./
multiple_email_delete_page.inc, line 18 - Contains functions the interface side of deleting an address
Code
function multiple_email_delete_page($eid) {
global $user;
if ($email = multiple_email_get_address($eid)) {
if ($user->uid == $email->uid) {
if ($email->primary_address) {
drupal_set_message(t('You can not delete your primary email address!'));
}
else {
return drupal_get_form('multiple_email_delete_form', $email);
}
}
else {
drupal_set_message(t('Email address not found'));
watchdog('Multiple Email', 'Attempted unauthorized access to email ' . $eid . ' by user ' . $user->uid);
}
}
else {
drupal_set_message(t('Email address not found'));
watchdog('Multiple Email', 'Failed to load address ' . $eid, WATCHDOG_WARNING);
}
drupal_goto('my-email-addresses');
}