In CiviCRM I set up an event including registration but when I select the option to allow a user to register for the event and at the same time as a Drupal user, after you continue from the event confirmation page instead of going to the Thank You page it shows the entry page containing just a name/password box and a weird error saying 'Please enter your email'.

I have had my consultant take a look at it and he says "Checked the Drupal permissions - look fine, Checked some email settings - look fine, Turned on Drupal error reporting and completed the form again. Now got the message 'Notice: Undefined index: email-Primary in CRM_Utils_System_Drupal->createUser() ' http://bdva.s803.sureserver.com/admin/reports/event/11578'

We have done a few searches but not found anything on this error and for the time being we have now turned off create Drupal user in all profiles attached to event registration.

What should we do to create Drupal users and show the Thank you pages on Event signups?

  • What versions of Civicrm and Drupal are you on?.
    – JoAnne
    Commented Jun 1, 2015 at 2:42

1 Answer 1


CiviCRM lets you have collect more than one address/email/phone for each contact and these are differentiated by the "location type" of each.

Standard location types are "Home", "work", "billing", "main" and "other", but you can add more if you want to.

One of these location types is then set as the default "primary" location type via a yes/no field attached to each location type. The address/email/phone designated as "primary" is the one that civicrm will use when producing labels or sending emails or SMS to that contact.

You can override the default "primary" designation on a contact by contact basis. For example you may have the location type "home" set as the default primary location type, but for Martha you choose to set "Other", containing a PO box address, as her primary address location.

This means that when you are creating a profile to extract information (say, a journal mailing list) from CiviCRM you need the ability to output whatever address/email/phone is designated as "primary" for each person, rather than be restricted to just the actual location types of "Home", "work", "billing" etc.

It sounds to me that you may have included the "primary" email "field" in the profile you are using to create the Drupal user. However, it is not actually a field, but rather a yes/no qualifier for true email location type. I think that may be why you are getting the error.

You should edit the profile and change the email field designation to be an actual email type ("home", "Work" etc.). I think that will solve your problem.

  • If so, wouldn't this be a pretty bad bug? People use the "primary" location type in profiles all the time.
    – Andie Hunt
    Commented May 31, 2015 at 2:25
  • I think it is only an issue if the "primary" email field is specifically included in the profile used for drupal user registration. (You don't have to include an email field in that profile.) I will investigate further when I have time.
    – JoAnne
    Commented Jun 1, 2015 at 2:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.