function privatemsg_delete_submit in Privatemsg 6
Same name and namespace in other branches
- 6.2 privatemsg.pages.inc \privatemsg_delete_submit()
- 7.2 privatemsg.pages.inc \privatemsg_delete_submit()
- 7 privatemsg.pages.inc \privatemsg_delete_submit()
File
- ./
privatemsg.module, line 1553 - Allows users to send private messages to other users.
Code
function privatemsg_delete_submit($form, &$form_state) {
global $user;
$account = drupal_clone($user);
if ($form_state['values']['confirm']) {
if (isset($form_state['values']['delete_options']) && $form_state['values']['delete_options']) {
privatemsg_message_change_delete($form_state['values']['pmid'], 1);
drupal_set_message(t('Message has been deleted for all users.'));
}
else {
privatemsg_message_change_delete($form_state['values']['pmid'], 1, $account);
drupal_set_message(t('Message has been deleted.'));
}
}
$form_state['redirect'] = $form_state['values']['delete_destination'];
}