function pmperson_migrate_email_adjust_form_save_submit in Drupal PM (Project Management) 8
Same name and namespace in other branches
- 7.3 pmperson/includes/pmperson.migrate.inc \pmperson_migrate_email_adjust_form_save_submit()
- 7.2 pmperson/includes/pmperson.migrate.inc \pmperson_migrate_email_adjust_form_save_submit()
Save submit handler.
See also
pmperson_migrate_email_adjust_form()
1 string reference to 'pmperson_migrate_email_adjust_form_save_submit'
- pmperson_migrate_email_adjust_form in pmperson/
includes/ pmperson.migrate.inc - Form for resolving email conflicts.
File
- pmperson/
includes/ pmperson.migrate.inc, line 717 - Migration functions for the PM Person module.
Code
function pmperson_migrate_email_adjust_form_save_submit($form, $form_state) {
$id = $form_state['values']['id'];
$type = $form_state['values']['type'];
$mail = $form_state['values']['mail'];
switch ($type) {
case 'user':
$account = user_load($id);
$edit['mail'] = $mail;
$edit['init'] = $mail;
user_save($account, $edit);
break;
case 'pmperson':
db_update('pmperson')
->fields(array(
'email' => $mail,
))
->condition('nid', $id)
->execute();
break;
}
}