function usermerge_merge_form in User Merge 7.2
Same name and namespace in other branches
- 6 usermerge.module \usermerge_merge_form()
- 7 usermerge.module \usermerge_merge_form()
Form to collect the two user IDs.
1 call to usermerge_merge_form()
- usermerge_do in ./
usermerge.module - Merges two accounts automatically, making decisions on which data should be preserved.
2 string references to 'usermerge_merge_form'
- usermerge_do in ./
usermerge.module - Merges two accounts automatically, making decisions on which data should be preserved.
- usermerge_page in ./
usermerge.module - Loads includes before calling drupal_get_form().
File
- ./
usermerge.module, line 57 - Main file for the User Merge module.
Code
function usermerge_merge_form($form, &$form_state) {
if (!empty($form_state['form_page']) && $form_state['form_page'] == 'review_table') {
return usermerge_data_review_form($form, $form_state);
}
// This is necessary, otherwise the title will show up as "People"
drupal_set_title(t('Merge accounts'));
$form['supported_actions'] = array(
'#type' => 'fieldset',
'#title' => t('Supported actions'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['supported_actions']['list'] = array(
'#theme' => 'item_list',
'#type' => 'ul',
);
$supported_actions = usermerge_invoke_all('usermerge_actions_supported', array());
ksort($supported_actions);
$form['supported_actions']['list']['#items'] = $supported_actions;
$form['general']['usermerge_user_delete'] = array(
'#type' => 'textfield',
'#title' => t('The name of the account you wish to remove'),
'#autocomplete_path' => 'user/autocomplete',
'#required' => TRUE,
);
$form['general']['usermerge_user_keep'] = array(
'#type' => 'textfield',
'#title' => t('The name of the account you wish to keep'),
'#autocomplete_path' => 'user/autocomplete',
'#required' => TRUE,
);
$form['general']['usermerge_user_delete_action'] = array(
'#type' => 'select',
'#title' => t('Action to perform on the account you wish to remove'),
'#options' => array(
'block' => t('Block'),
'delete' => t('Delete'),
),
'#default_value' => 'block',
);
$form['general']['submit'] = array(
'#type' => 'submit',
'#value' => t('Review account data'),
'#submit' => array(
'usermerge_merge_form_submit',
),
);
return $form;
}