Array merge of user_register_submit function squashes pre-defined user_register_submit functions

mikehostetler - June 15, 2009 - 19:24
Project:LoginToboggan
Version:6.x-1.6
Component:Code
Category:bug report
Priority:normal
Assigned:mikehostetler
Status:closed
Description

Logintoboggan overwrites $form['#submit'], squashing my previously defined custom user_register_submit function. The code is set up to not clobber the function, but during my testing this was the case. I've attached a patch which fixes the issue.

AttachmentSize
logintoboggan_user_register_submit.patch536 bytes

#1

hunmonk - October 14, 2009 - 17:53
Status:needs review» fixed

committed to 6.x-1.x-dev and HEAD.

thanks and sorry for the delay!

#2

System Message - October 28, 2009 - 18:00
Status:fixed» closed

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

#3

tayzlor - November 3, 2009 - 12:42
Version:6.x-1.5» 6.x-1.6
Status:closed» active

re-opening this as i am still experiencing this problem.
if i use the content_profile_registration function in conjunction with logintobban and do the following -
expose a content field to the registration form.
on submit what should happen is -

- logintoboggan_user_register_submit should run and process the login.
- content_profile_user_register_submit should run after the above and process the extra content fields on the form and save the node in the database.

if i set immediate login to ON the 2nd function does not run. If i set immediate login to OFF - it will process the 2nd submit function and save the node. I'd ideally like to use immediate login.
Also changing the version as i've upgraded to 1.6 and the problem persists.

#4

tayzlor - November 3, 2009 - 14:21
Project:LoginToboggan» U Create
Version:6.x-1.6» 6.x-1.0-beta2
Component:Code» ucreate.module

upon further inspection it seems another module i have installed is messing up the process - UCreate, if i comment out the hook_user in that module, logintoboggan runs its course fine. Moving this to the UCreate issue queue and will expand on the issue there.

#5

tayzlor - November 3, 2009 - 14:22
Project:U Create» LoginToboggan
Version:6.x-1.0-beta2» 6.x-1.6
Component:ucreate.module» Code
Status:active» closed

actually, closing this, will re-open another issue over there.

 
 

Drupal is a registered trademark of Dries Buytaert.