When I create a node and use inline registration form, I can register multiple accounts with the same email and password. But its not right. Its possible flooding with different accounts from one person.

Comments

Mir’s picture

Oh yes, it's not very nice

Mir’s picture

Without password processing (e. g. LoginToboggan with Set password option unchecked) it is possible to make simple modification of inline_registration_submit function.

Something like this (see // added)

function inline_registration_submit($form, &$form_state) {
  $mail = $form_state['values']['mail']; // added
  $user = user_load_by_mail(check_plain($mail)); // added
  ...
  unset($form_state['values']['status']); // if not unset the user will be logined
 
  if (!$user) {// added
    if (module_exists('logintoboggan')) {
      logintoboggan_user_register_submit($form['register']['form'], $form_state);
    }
    else {
      user_register_submit($form['register']['form'], $form_state);
    }
  }// added
  else {// added
    $form_state['user'] = $user; //added
  }// added

  $form_state['values']['name'] = $form_state['user']->name;
  ...
  
}
vvvi’s picture

Issue summary: View changes
Status: Active » Closed (fixed)