You are here

function usermerge_merge_form in User Merge 7

Same name and namespace in other branches
  1. 6 usermerge.module \usermerge_merge_form()
  2. 7.2 usermerge.module \usermerge_merge_form()

Form to collect the two uids.

1 string reference to 'usermerge_merge_form'
usermerge_menu in ./usermerge.module
Implements hook_menu().

File

./usermerge.module, line 48
Main file for the user merge module, which re-assigns data from an abandoned account to a live one.

Code

function usermerge_merge_form($form, &$form_state) {

  // Find out what's supported.
  $supported_actions = module_invoke_all('usermerge_actions_supported');
  $form['general']['supported_actions'] = array(
    '#markup' => t('Merging a user will:') . theme('item_list', array(
      'items' => $supported_actions,
    )),
  );
  $form['general']['usermerge_user_delete'] = array(
    '#type' => 'textfield',
    '#title' => t('Username for the account to remove'),
    '#description' => t('All content associated with this user will be changed so it is associated with the other user.'),
    '#autocomplete_path' => 'user/autocomplete',
    '#required' => TRUE,
  );
  $form['general']['usermerge_user_keep'] = array(
    '#type' => 'textfield',
    '#title' => t('Username for the account to keep'),
    '#description' => t('The account to use in the future.'),
    '#autocomplete_path' => 'user/autocomplete',
    '#required' => TRUE,
  );
  $form['general']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Merge Accounts'),
  );
  return $form;
}