defining user categories as entity bundles by keeping it much simpler than what "profile2" does and without depending on the "entity api" contributed module
the trick behind this module is to use $form['#entity_builders'] in user_profile_form to build the category entity on submit
categories could be defined using hook_user_categories
or managed under admin/config/people/categories where also field ui is attached
version 1.x creates entity "user_category" and a bundle for each category returned by hook_user_categories
branch user_alter creates the categories as bundles for the user entity .
this version has critical bug : http://drupal.org/node/1260504, but it is still an interesting development approach
i had to turn off field cache for user entity for it to work, since the cid is per entity_id and i didn't create a separate entity for each bundle instance .
i also extended UserCategoriesController to provide custom cache handling to compensate over disabling the default cache .
Downloads
Project Information
- Maintenance status: Actively maintained
- Development status: Under active development
- Module categories: User Management
- Reported installs: 10 sites currently report using this module. View usage statistics.
- Downloads: 90
- Last modified: December 31, 2011