Closed (fixed)
Project:
Entity Registration
Version:
7.x-1.x-dev
Component:
Registration Core
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Mar 2012 at 14:00 UTC
Updated:
27 Jun 2014 at 21:08 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dpiA design decision has been made to make the registrant identifiable by email. Would you prefer people to be uniquely identified by Drupal user? You still need an email to be a Drupal user.
Do you have any recommendations?
Comment #2
lsolesen commentedWell, I am not sure. In my use case the registrant should be able to register more people and still supply custom info about the individual registrants. Right now an e-mail is required for all the individual registrants, but many of the people registering for my events are married and have only a shared e-mail.
I do not think the drupal user is any good either.
Couldn't it just be an id? That would make it more flexible?
Comment #3
lsolesen commentedComment #4
ezra-g commentedIn response to #1, the Signup module uses an automatically incrementing "Signup ID" integer as the unique identifier. A potential drawbacks to using email address as the unique identifier for a signup is that it duplicates information already stored in the user object.
Is there a specific benefit to storing the email address by default in both places?
Comment #5
ezra-g commentedAfter further investigation, I see that we do store a unique registration_id. It seems like the motivation (similar to the Signup module) is to make anonymous registrations possible where no user account exists.
If that's accurate, perhaps the mail field could be hidden for authenticated users, and we could by default ship with a registration_uid field (to distinguish the registrant from the person who created the registration)?
Comment #6
dpi+1
Comment #7
rdas commentedI'd also prefer some other form of a unique ID other than an email. If this is being designed for wide and varied use applications the email is not the most accessible in certain demographics. Also many people prefer not to provide an email.
Comment #8
dpiIts a broad idea, but this is what I am thinking so far:
Built in functionality of Registration should be: username autocomplete field on registration form, associating a registration with a Drupal user.
(Remember: author != registered user). Defaults to NULL.
not null to false, defaults to NULL.
Split out anonymous functionality to submodule. Functionality would include:
This is current built-in functionality of Registration.
creation of unsubscribe hashes for emails.
Add a registration <-> hash pair table.
I think separation of anonymous functionality would be ideal due to unsubscribing issues (see #1308908: Registerd user cancels a registration) which adds additional overhead for those who just want to use Drupal users.
Comment #9
levelos commentedI think long term we need a separate registrants table, where we'd keep email for anonymous and uid for authenticated registrants. Reason being so that a single user could register multiple registrants. We would also need this to handle registration verifications (especially important for anon) and allowing users to unsubscribe themselves. The hash @dpi mentions could be stored there. Thoughts?
Comment #10
lsolesen commentedI understand why a single registration needs an e-mail. However, what if several registrations is made on the same registration - are you still advocating for each of the registrations to have an e-mail?
Comment #11
dpi@levelos I dont understand why a single user couldnt register multiple registrants, by using current table structure + 1 column.
Registrations should be one table!
Fields:
* registration_id
* type
* entity_id
* entity_type
* mail (only fill for anon)
* uid (only fill for Drupal user, this is the only field that should be added)
* count
* author_uid creator of registration
* created
* updated
Add one extra table for anonymous:
Containing only two fields:
* registration_id
* hash (for unsubscribing)
I dont follow what the logic is to: splitting {registrations} into two tables (one for Drupal users, one for anonymous), and adding hash to the anonymous table.
Comment #12
levelos commentedI'm not suggesting having a separate table for anonymous vs auth registrations. Use case:
User X from company Y wants to register all his colleagues. She completes the registration process providing information on 5 people total, including herself. There is a single registration, created by X, with 5 registrants tied to it. Those individual registrants need to be tied back to a single registration, manage their status, etc. Even more relevant if it's a paid registration and you need to tie an order to each of the registrants through their parent registration. I'm open to alternatives, this jumps out as making sense to me.
I also want to clarify our initial reason for leaving the user out of the registration. Since some type of user field could be added to registration bundle (E.g., entity reference, relation, or references), we didn't want to make assumptions about how users would be related to a registration. Further, if you allow multiple values on the user field, that'd be one way a single person can register multiple users. We also explored using field_collection as a way to allow a single person to enter more than one piece of information for a group of registrants. E.g., first name, last name, etc.
Finally, I want to mention that another reason that email is required is to simplify the broadcast and reminder functionality. I realize that we could get to an email from the user object, but not if we don't know how users are related to a registration.
Comment #13
dpiOk, I misinterpreted what you were saying.
Why have the email field in the registrations table at all then? Why not just have it in the associated 'people' table. If you need to blast an email to the author, you would use author_uid-> user object -> email.
Some thoughts on what I am interpreting what you are saying:
Existing {registration} table thought of as "slots".
{registrations people}
This seems overly complicated. I'm sure adding this "people" table would complicate things a lot more than it needs to be, especially when constructing views.
Comment #14
Loube commentedHi, I am excited about Entity Registration with Commerce Registration. I have a site that is nearly ready except for the registration component. When I found your module I was hopeful that it would be the answer.
The site I am working on is a non-profit that has nature day camps. Often parents sign up siblings for the same camp. This is where the email becomes a problem, because it is the children who are the multiple registrants (no email) and the one registering them, the parent, has one email.
I don't know if changing the email requirement is something that is being worked on or not. I wanted to add my case scenario so you know that using something other than an email would solve an important issue.
Also, I am wondering if a parent signs up the same child for multiple camps, which is often the case, will the email be accepted for each camp even though the email is the same?
Which leads me to the next thing. Is there a way to have the parent register for multiple programs (products), by adding them to the Commerce cart, but only enter the registrant (child's) information only once?
Thank you.
Comment #15
ezra-g commentedIf you need to have users associate event registration with an order, why not selectively use the order functionality provided by Drupal Commerce? My sense is that order tracking is out of scope from Entity Registration. By using Commerce, Entity Registrations can benefit from any additional features related to order viewing/tracking/reports rather than building them again specific to ER.
The Signup module supports anonymous and authenticated signups to a single event and manages to store them in a single table by referring either to a single UID or an optional anon_mail column, without duplicating the storage of information from the user object.
Being able to simply create a listing of attendees without additional joins (eg with Views) is another compelling reason to store this information in a single table.
Comment #16
jpontani commentedMy question is: why even separate the registrations from registrants? It's going to cause a nightmare with fields. Where do you attach fields now? The registrants now have to become a fieldable entity, and thus still need their own registration ID, otherwise you're entering registration bundle fields for a single parent registration and assuming each registrant for that registration is to use those field values.
In trying to have a parent-child relationship in terms of registration/registrants, why? It somewhat duplicates something like Drupal Commerce with the parent being the order that ties the registrants together. If you don't have Drupal Commerce (thus no order ID; think free events), just create a key that links registrations together, such as the author and created time in a separate hash. You could still add the registrant columns to the registrations, as the registrations would still be the "registrant", with a pseudo parent entity just being a hash value upon creation. Or better yet, just link all "child" registrations to the initial registration by the registration_id that they were all created from. You would still know that the initial registration wasn't necessarily created by the registrant based on the author_uid being different from the registration's user info. You could easily grab all registrations based upon this parent_registration_id.
In your concept the changes would thus become:
Registrations
Registrants
This change arises from the fact that you can have multiple registrants per registration, but each registrant could have a different entity that they are registering for (at least in my head), thus the need to move the entity_id and entity_type to the registrants table. Now the Registrations table becomes almost pointless as it adds no real extra relationship information that you couldn't otherwise just store in the Registrants table.
Just a thought.
Comment #17
lsolesen commentedSo what about the discussion whether e-mail as required?
Comment #18
ezra-g commentedI marked #1506536: Make email fields optional for authenticated users as a duplicate.
Comment #19
levelos commentedIt sounds like there's a strong consensus to keep everything in a single table, in which case we'd add a UID column and make email optional. I'm fine going that route. It raises a couple questions, though.
Just thinking out loud ... anyone have thoughts on the above? Also changed the issue title to be more descriptive.
Comment #20
jpontani commentedI would venture that it would never actually be shown to the user, instead it is programmatically set to the UID of the registrant for that specific registration, if accounts are created upon registration. Otherwise just set it to 0 to recognize that it was an anonymous registrant. You would still know if another user registered an anonymous user based upon the author_uid column.
I guess I just fail to understand why a field collection is necessary. Registrations already are fieldable and can be associated to a parent registration by simply adding a "parent_registration_id" to the registration. Then you know who created the registrations (author_uid of the parent). This prevents having issues regarding capacity limits as it still creates separate registrations per registrant, and allows broadcasts to work as they do now.
Comment #21
dpiAlways default to current user. But make that apparent in the form with a message "registering for yourself" or something.
Registration form with up to three elements for choosing identity, with maybe options elements to choose between:
Notably, still need some kind of verification system for anonymous users to un-register.
Entity Reference?
Need a framework for contacting people if there are going to be so many people types. A method ($registration->people/registrants/contacts()) which returns a list of user objects, and dummy user objects ($user->mail set) for anon.
Comment #22
attiks commentedThat was our idea as well: for auto creation of new users on registration have a look at http://drupal.org/sandbox/jelles/1506486, it works both ways, it can prefill fields for authenticated users and it can create user accounts for anonymous users. It works well in combination with #1506536: Make email fields optional for authenticated users.
Comment #23
levelos commentedHey gang - Just pushed a few commits implementing this thread. Please reference:
s suggstions.
I'm assuming this is going to need a few more revisions and some testing, so marking as "needs review" for now. Let me know what you find.
Comment #24
dpiLooks good, love the AJAX implementation!
Some notes:
Registration people
Perhaps
Checking anonymous emails in account emails.
Prevent anonymous email if a user account with same email has already registered for this entity.
Rename some permissions
change register other permissions to 'registration register other account $type' and 'registration register other anonymous $type'
Anonymous email vs Account email
Change $recipients[] = $registration->mail to mail() method.
Schema
('entity_id', 'entity_type', 'anon_mail') when anon_mail/user_id is NULL for multiple entries.
Comment #25
levelos commentedThanks @dpi, great tips. Most are committed. Also handled setting propor defaults for who is registering field for existing registrations. A few points.
Not necessary, the mail property is set from the method in the constructor.
Chose to have both uid and email col. Convenient for a few reasons, including maintaining mailto links. Users the mail() method.
Really want to avoid promising this until we're out of alpha, which will hopefully be soon. Leaves lots of cruft in the install file in addition to time.
Comment #26
attiks commentedSmall patch for
BTW: great improvements!
Comment #27
attiks commentedMake email additional (and don't validate) if a signed in user tries to register other people without an email address.
Comment #28
attiks commentedComment #29
dpiStill not fixed. In Registration class: Registration->anon_mail change:
$anon_mail = '',to$anon_mail = NULL,BUG: If 'me' is only value, multiple submissions are allowed (due to #access) if user does not have 'create * registration other *' permissions.
Expanding on #26.
Adding helper to determine what people types may register for event, from perspective of a user.
Show forms based on this helper.
Please see attached for some ideas.
Edit: Would probably move check in registration_register_page_access() to registration_access() create block.
Comment #30
jelle_sthe update function is missing from the .install file,
this means:
Comment #31
dpiSee #25 and #1512498: Missing db update for mail and uid column changes
-dev is considered unstable at this time.
Comment #32
attiks commentedNew path based on #31, there was a problem with anonymous users
Comment #33
levelos commentedThanks for the feedback. @dpi, I fixed the issue with the anon_email needing to be NULL. @attiks, the 'me' option still needs to be there so a user can switch back and forth when editing a registration. At this point, I want to close this issue as it's too broad. Please create separate issues for any bugs/changes and lets keep issues and patches more singular in nature so they are easier to review and apply.
Thanks again for the support and looking forward to pushing for a stable release.
Comment #35
lsolesen commented@dbi You raised some issues in #24. Are there separate issues for the things, that have not been dealt with yet?