CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Registering multiple participants from single login
Pages: [1]

Author Topic: Registering multiple participants from single login  (Read 1621 times)

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Registering multiple participants from single login
March 13, 2008, 12:04:26 pm
Hi,

This is the use case I'm trying to cover:
We have a Drupal/Civi site for an umbrella organisation; their members are themselves organisations and use a single Drupal login per organisation. Org A want to log in and register 5 participants for an event. What seems to happen (have tested on 2.0 demo) is that a logged-in user can only register themselves; changing the email address on the registration form simply changes the logged-in user's email address in their CiviCRM contact record, which strikes me as odd behaviour. However an anonymous user can submit multiple registrations for different email addresses and CiviCRM Contact records get created for the participants, which is the desired behaviour.

So we could tell the member organisations that in order to register their participants, they must first log out. But that seems an odd way to proceed.

My preferred behaviour would be: registration form defaults to logged-in user's email address but if they change it, the registration is treated in the same way as it would be for an anonymous user, i.e. the relevant dupe checking is done and a new Contact record is created if needed.

This strikes me as more intuitive behaviour (apart from being convenient for me!). Any problems with this? Or have I missed something? I'll create a feature request in JIRA if people think this is a sensible change.

Thanks,

Dave

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Re: Registering multiple participants from single login
March 13, 2008, 12:16:27 pm
Further point:
I've seen discussions of signing up Participant + guest as a single registration, but this isn't what is wanted here. There is a need to have a Contact record for each participant and also to have custom fields per participant for dietary & access needs etc. Of course if the member organisation had CiviCRM admin access, they could create the Contact records and register them; but they don't (and shouldn't) have such access. Another approach would be to email the participants, ask them to create logins & register themselves, but this isn't the way the member orgs want to do it. The logged-out behaviour is just what's wanted.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Registering multiple participants from single login
March 13, 2008, 01:45:21 pm

I suspect asking the member org to register additional users as a logged out user is much easier for us to deal with from a code perspective. I think basing the behavior on same / different email address is kinda hackish. In profiles we actually created a different url (civicrm/profile/create) to distinguish between an edit and create.

However your thread has sparked some thoughts (yes it does happen some time!) about the member + guest.

We do plan on creating a participant record and contact record for each guest and collect information on them (i.e. you are registering multiple participants at the same time). We should reuse the "profiles" the event uses to collect additional participant information. That way we do get all the custom field information for each new contact / participant

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Re: Registering multiple participants from single login
March 14, 2008, 05:11:29 am
Thanks for the reply, Lobo. Your comments on guests sound promising.

Re: "I think basing the behavior on same / different email address is kinda hackish":

That's not how I see it, from a user perspective. It's a registration form with an email field. The behaviour I would expect is that the person whose email address I enter in that form, gets registered for the event. I'm happy for the form to be pre-filled with my email address if I am logged in. I am not happy that if I enter a different address in the form, my contact record gets updated with this different address. This is a registration form, not a contact edit form. I was bemused when I first tried this out and found that my event had a participant called Janet Demouser (presumably a rodent control operative) who bizarrely had my email address.

So I don't see it as a case of basing the behavior on same / different email address. The behaviour is always (regardless of whether logged in): register the contact who has the email address entered; if no such contact exists, create one.

If the assumption has already been made in the code, by the time the registration form is drawn, that the person we want to register is the logged-in user, then I can see your point about "basing the behavior on same / different email address". But what if we don't make that assumption and instead, as in the not-logged-in case, wait to see what email address gets entered in the registration form and then retrieve/create a contact based on that? (There may be very good reasons why not for all I know, I'm just floating the question. :) )

If there isn't general support for this change, I'll try to customise our installation as I don't think the member orgs will remember or understand that  they have to log out to register people. ["It says I've already registered and one of the delegates has just told me they've been getting email from CiviCRM..."] Am I entering a world of pain here? From a quick look, setDefaultValues in Event/Form/Registration/Registration.php seems like a promising place to start - if I were to comment out the if ( $contactID ) clause there, would I break things in inscrutable ways?

The guest stuff could be very useful further down the line but for now, they want something working in the next week or two.

Thanks again,

Dave

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Registering multiple participants from single login
March 14, 2008, 12:27:14 pm

If you need it in the next week or two, you'll have to hack the code irrespective of what we decide (since any change of this nature would be made in 2.1 only)

I think a slightly better solution might be to give the user the option of "registering" a new participant and driving the behavior based on a get var being set or not (in case of a logged in user). this is similar to the way we do things in profile and the behavior is a bit cleaner and easier to explain (IMO)

There are a few places in Registration.php and Registration/*.php where you will need to make the change about creating a new contact. you can start by searching for the places where we initialize $contactID (in most cases we get it from the session for a logged in user)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

davej

  • Ask me questions
  • ****
  • Posts: 404
  • Karma: 21
Re: Registering multiple participants from single login
March 18, 2008, 11:09:40 am
Thanks for the further reply, Lobo. I completely understand that if we want changes on a short timescale, or changes that aren't of general use, then it's up to us (er, me) to implement them.

Just had a meeting with the client (umbrella group). Good news: they've become more relaxed about the timescale. Bad news: they want a member org to be able to register multiple participants with a single email address. I.e. the org may have only one email - info@my.org - and they want to register several participants who do not have their own email addresses. Could this use case be covered with the member + guests approach?

Thanks again,

Dave

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Registering multiple participants from single login
March 18, 2008, 01:35:41 pm

Not sure of that, we have not yet speced it out.

most likely we will use the same profile and email for every additional participant as the main participant. That way we can keep things consistent and also reuse the same participant code.

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Registering multiple participants from single login

This forum was archived on 2017-11-26.