I wath that user can set up their passwords on registration form when creating content type - Im using logintobogan module for that. But there seem to be some king of conflict with sending validation emails:

1. When user create his account on /user/register - this account is set up as not verified. Email with this link is sent:

http://www.examle.com/user/validate/11/1287310294/0714f0a57cb96ab4e84c9e862bf9c1ca

Everithing is perfect.

Test site is here:
http://www.iveterinar.sk/user/register
http://www.iveterinar.sk/node/add/forum

2. When user create his account using inline registraion - this account is set up as verified. Email with this link is sent:

http://www.example.com/user/reset/10/1287309853/093d621b59f9c078bdb5fceec0e27677

It suppose to be validate and not reset.

Comments

pragnatek’s picture

I'm seeing the same issue.

willhowlett’s picture

Likewise. It looks like it's something to do with Inline Registration setting the user role and overriding LoginToboggan's attempt to unset it.

willhowlett’s picture

Status: Active » Needs review

Hack alert!

Not set up to do a patch I'm afraid (anyone know how I should go about doing that?)

Line 83 of inline_registration.module:

Replace:

  user_register_submit($form, $form_state);

  $form_state['values']['name'] = $form_state['user']->name;
  $form_state['values']['uid'] = $form_state['user']->uid;
  $form_state['values']['status'] = $status_save;

With:

 if (module_exists('logintoboggan')) {  
  logintoboggan_user_register_submit($form, $form_state);

  $form_state['values']['name'] = $form_state['user']->name;
  $form_state['values']['uid'] = $form_state['user']->uid;
  $form_state['values']['status'] = $status_save;
  }
  
  else {
  user_register_submit($form, $form_state);

  $form_state['values']['name'] = $form_state['user']->name;
  $form_state['values']['uid'] = $form_state['user']->uid;
  $form_state['values']['status'] = $status_save;
  }

This has fixed the problem for me. Not sure if this sort of thing (if module exists statements etc.) is the best way to deal with module conflicts like this generally? Obviously this fixes my specific issue but if there's a better 'Drupal way' to go about this would be very interested in knowing it.

ju.ri’s picture

just tested this, and yes, it works with the patch.

alanpeart’s picture

I ran into a similar bug, I'm not sure if it was related to Logintoboggan or not, but it was impossible to pass validation without running into the "Email address is required" message (regardless of whether email field was filled out or not).

Debugging enabled me to see that the problem was that the email address was not making it into the $form_state['values'] array. I solved this problem by hacking the inline_registration.module and adding the line $form_state['values']['mail'] = $_POST['mail']; as the first line of the inline_registration_validate function.

Just posting this here in case anyone else ran into this problem. I have no idea why it happened for me since no one else has mentioned it.

n20’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev

For D7 and the 7.x-1.x-dev version of the module replace somewhere around line 80 in inline_registration.module:

  user_register_submit($form['register']['form'], $form_state);

  $form_state['values']['name'] = $form_state['user']->name;
  $form_state['values']['uid'] = $form_state['user']->uid;
  $form_state['values']['status'] = $status_save;

with

  if (module_exists('logintoboggan')) { 
  	logintoboggan_user_register_submit($form['register']['form'], $form_state);

  	$form_state['values']['name'] = $form_state['user']->name;
  	$form_state['values']['uid'] = $form_state['user']->uid;
  	$form_state['values']['status'] = $status_save;
  }
 
  else {
  	user_register_submit($form['register']['form'], $form_state);

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

Thanks for assistance, especially to willhowlett and N20. The bug is fixed and need testing.

vvvi’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.