Closed (duplicate)
Project:
Signup Integration for Ubercart
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 Jul 2009 at 17:42 UTC
Updated:
27 Nov 2009 at 18:57 UTC
Jump to comment: Most recent file
Comments
Comment #1
ezra-g commentedUC Signup does not use content profile fields, it uses the core profile module. Patches to make it work for content profile are welcome!
Comment #2
GregoryHeller commentedThis would be a great addition. I don't think we have it in our budget to work on it this time around, but we might be able to support work on it.
But i would first ask why is the core profile module required? what if i don't care to collect any information other than the username of the person "signing up" why would i need profile module?
Comment #3
gregglesYes, I think these two should both be optional.
@Gregoryheller - there are a couple folks interested in this so if you have some funding for it that could take it to completion.
Comment #4
recrit commentedok, so I have had numerous issues implementing the latest dev. The majority of which stemmed from this issue with the profile dependency and user creation in general. So I have created the following patch to decouple this module from profile. I have made some major changes to implement this, so I hope there are some testers available. It has worked in my limited testing.
Changes:
drupal_execute('user_register', $form_state), which if you are using content profile on your user registration form with required fields... that causes some problems.Comment #5
ezra-g commentedThanks for this patch. Unfortunately, it's difficult to review since it makes so many different changes. Could you break this into separate issues and patches?
Also, could you elaborate on the problems with using drupal_execute? This approach is used intentionally to avoid errors when using a captcha.
Thanks!
Comment #6
recrit commentedall the changes were to make the profile optional. I will have to think about breaking up patch. The attendee form overhaul could be a separate patch since that only cleans up the form to provide a common function to get more profiles fields from various sources. I will post back once I have something.
drupal_execute...
In my use case, I did not need to collect profile info so I had profile enabled but no profile fields. Everything would work fine since when
$profile_form = array_values(module_invoke('profile', 'user', 'register', array(), (object)array()));got called it only pulls the hook_user for the profile module. However, whendrupal_execute('user_register', $form_state)runs it calls everyones hook_user register such as CAPTCHA, content_profile (if you have it set to), some mail modules opt out, etc. The way I took uc_signup's use of the profile fields was to gather some extra user info for each attendee; therefore, if you are not asking if they are a human with CAPTCHA, using content_profile fields, or incorporating everything that would normally appear on the user registration form then the way to go is to do the same as uc_cart and just create the user account based on email alone. Then if you want profile fields you can only pull those for the uc_signup form - which you already are doing with the module_invoke('profile', 'user', 'register'...).I ran into the issue of having content_profile configured to be used on the registration form and I had 2 required fields of first and last name. When drupal_execute would run, it would try to create these content_profile nodes and stop on error of missing required fields.
Comment #7
ezra-g commentedPlease see #623900: API for additions to attendee info form for an update on how this can be implemented compatible with future plans for uc_signup.
Comment #8
ezra-g commentedMarking as a dupe of the above mentioned issue.