1

From the back office admin, creating a user is impossible if there are Drupal fields attached that are required. The workaround has been to temporarily unmark the fields as required, but this is tedious. Is there some modification we can make for it to ignore required Drupal fields when we use this function?

Editing for clarity:

  1. Users register on the Drupal front end - there's a CiviCRM Membership Profile form that asks for additional information.

  2. On top of the Profile (which updates the CiviCRM record), we have a Drupal User field (image below) that allows the User to join an Organic Group at registration (required field).

enter image description here

  1. Because this field is required, we cannot use the "Create User Record" function on the CiviCRM Contact record because of the validation error on the required field.

enter image description here

  • Not sure i follow. Alex you may need to explain this more. Are you using Drupal Profile (which adds Drupal fields on the Drupal User), or do you mean there are required civicrm fields showing in the Profile that is used for drupal user? or something else – petednz - fuzion Mar 23 '16 at 0:03
  • Hi Pete - I've edited the original question for clarity. We're using a CiviCRM Profile with "Drupal User Registration" enabled which shows the profile on the registration form. But we also have a custom field on the Drupal user page too (admin/config/people/accounts/fields) that allows Organic Group selection. – Alex Katayama Mar 23 '16 at 17:42
  • So in a sense, civi 'create user record' is doing the 'right' thing in terms of the drupal user creation requiring the field that you are requiring. not sure this will be an easy civi fix - if it is a civi issue at all. perhaps there are ways around 'requiring' the OG field such as using a sync tool that adds contacts to the OG based on some civi characteristic? if so i would fork that off as a separate question. and i will turn this in to an answer – petednz - fuzion Mar 23 '16 at 18:57
  • do the back office Admin know which Chapter they should be adding people to when they create these drupal users? – petednz - fuzion Mar 23 '16 at 18:59
1

I think this is a symptom of a structural issue: you have Drupal fields on a contact. Perhaps they're best brought into Civi?

The quickest option is to give those Drupal fields default values for when they haven't been filled in.

An alternative is to create some kind of custom extension or custom module that prevents this issue for you.

  • Hey John, the question was updated for clarity - We're using a CiviCRM Profile with "Drupal User Registration" enabled which shows the profile on the registration form. But we also have a custom field on the Drupal user page too (admin/config/people/accounts/fields) that allows Organic Group selection. Thanks. – Alex Katayama Mar 23 '16 at 17:44
  • John's suggestion about setting a default value would be one way out of this. – petednz - fuzion Mar 23 '16 at 18:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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