0

Profile2 allows to give access to a profile based on user role. This works naturally when creating a profile is optional for privileged users with an extra role. How can you achieve what is more or less the reverse? That is,

  • Visitors can create a user account, and a main profile2 profile must be filled out on the user registration form (it has some required fields)
  • But, admins should be able to create users without this main profile (e.g. new admin users). This does not seem possible with the usual configuration options...

What is the best way to achieve this?

0

I'm going to guess the best option is to:

  • set the profile fields to not required
  • set the profile to show on the user registration form
  • then hook into the user registration form via a custom module to set the profile fields you want filled out as required (and admin-created users added via user/add will be able to skip these fields).

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.