function pmperson_migrate_email_adjust_form_delete_submit in Drupal PM (Project Management) 7.3
Same name and namespace in other branches
- 8 pmperson/includes/pmperson.migrate.inc \pmperson_migrate_email_adjust_form_delete_submit()
- 7.2 pmperson/includes/pmperson.migrate.inc \pmperson_migrate_email_adjust_form_delete_submit()
Delete submit handler.
See also
pmperson_migrate_email_adjust_form()
1 string reference to 'pmperson_migrate_email_adjust_form_delete_submit'
- pmperson_migrate_email_adjust_form in pmperson/
includes/ pmperson.migrate.inc - Form for resolving email conflicts.
File
- pmperson/
includes/ pmperson.migrate.inc, line 746 - Migration functions for the PM Person module.
Code
function pmperson_migrate_email_adjust_form_delete_submit($form, &$form_state) {
$id = $form_state['values']['id'];
$type = $form_state['values']['type'];
switch ($type) {
case 'user':
if ($id != 0 and $id != 1) {
// It is safer to use drupal_goto() as it simulates a link.
// This avoids an unintended form submission.
$query_string = array(
'destination' => PMPERSON_RESOLVE_DEPENDENCIES_LINK,
);
drupal_goto("user/{$id}/cancel", array(
'query' => $query_string,
));
}
break;
case 'pmperson':
db_delete('pmperson')
->condition('nid', $id)
->execute();
break;
}
}