There is a long running discussion about Users not supporting multiple bundles and how different User types are stored. There are a bunch of ways that this could be implemented and now is a good time to at least think about it however we could entirely rely on Contrib to provide this functionality without too many issues.

What is it?

  • Different types of Users- If we want to do more with users it becomes natural to want to have different types of users but this causes problems
    • Registration: Note, we’ll probably need to at least support the possibility of multiple Drupal registration forms for different cases.
    • Example: Staff, Student, Organisation, Household

Original Drupal discussions about User Bundles

User Types are different to Entity Types - Problems with bundles

  • Not Dynamic - It can’t change over time. If a Node is an article it can’t later become Page. However it is possible that a “Student” user could later become a “Staff” if they got employed by the organisation
  • Not Multiple - An entity can only have one bundle at a time. No Node can be both an article and a page. However Users will probably want to be both. A staff member of an organisation may also be enrolled in a course and be a student. When we build dashboards I should be able to use contexts to see the same user differently depending on the context I’m viewing them with.
  • Not Hierarchical - There are no entity “sub-types” or anything similar. Don’t quite know if this is an issue yet.

Possibly use roles for different “User Types”
We can make it so that Profile Entities are attached to a User based on the User’s role.

  • Positives - They are already dynamic and multiple and already categorise different users.
  • Negatives - They already do quite a bit regarding permissions and will this just add complication to quite a simple system?
    • They are not hierarchical and I have a feeling that people are going to need this in at least contrib.
    • How do we do “attaching profiles to a user” is it just through permissions? I think we need to do something closer than just access permissions.

Possibly use Taxonomy for different “User Types”
We could make it so that profile entities are attached to users depending on their taxonomy.

  • Positives - This is Multiple, Dynamic and Hierarchical. Technically we are actually doing what taxonomy is built for as we are categorising different types of users.
  • Negatives - This is not really what taxonomy is built for and so may seem a little crazy. We may want a “User Types” that is baked in closer then taxonomy allows. (For example its possible to delete all the different vocabularies... but if we built everything around a “Users vocabulary” will that be insane if things are deleted.

Possibly have User Types in contrib
We could leave the User Entity as it is with a hardcoded single bundle and allow contrib modules to categorise Users instead.

  • Positives:- Don’t have to make a decision now. Different implementations could use Roles, Taxonomy or something else. In our Party module we created a module called “Party Hats” which was really close to taxonomy but something we created to categorise parties and choose which profile2 entities would be attached to a party. This means almost no work now.
  • Negatives:- It means there is no concept of User Types in core and so no area of Drupal can use it (can’t think of one anyway apart from Roles). It might mean contrib modules have to implement this themselves a bunch of different times.

Comments

Rob C’s picture

Any update on this?

yautja_cetanu’s picture

Hi Rob C!

Regarding this stuff getting into Drupal 8 I have written up a summary here: http://drupal.org/node/1806514#comment-6721442

However we're continuing to build this stuff for contrib. We've been working in the non-profit sector trying to get a native Drupal CRM solution that these clients can use. One of our clients uses Maximiser and will be migrating around February and another uses IMIS and will be migrating around September. So we've got some time to go but if these projects are successful then we'll have some case studies of some pretty major organisations using Drupal as its heart.

Anyways if you want to find out more feel free to drop me and e-mail or a pm in IRC.

yautja_cetanu’s picture

Issue summary: View changes

Updated issue summary. Formatting