can someone please explain why user entity has only one bundle ?
i think it is natural to make user bundles as profile categories same as node bundles are content types .
instead core still have profile module which doesn't use field api at all, but looks the same as it was in the drupal6 version .

Comments

categories

also what about hook_user_categories ?
back in drupal6 there was hook_user which in addition to providing categories could also provide forms for each category .
but there is not hook_user_form in drupal7 .. so only through form_alter can the category be populated .

I agree, I'm sure there must

I agree, I'm sure there must be a good reason why this wasn't add to the core user module because it seems like a no-brainer. Have you checked out the profile2 module? It adds a new fieldable entity which attaches to a user so you can use it like categories, it might help with whatever you're trying to do.

user_categories

i created an experiment module : http://drupal.org/sandbox/yakoub/1259918
and discovered a design problem, since i tried to map bundles for user_categories without creating different entities per bundle instance , but that created a problem with field cache since the cid is created per entity_id and that lead to field_attach_load to load the first category fields for latter calls for the rest of the categories

so i had to turn off field cache for user entity for the module to work

hook_field

i am going to try another approach where the user entity continue to have only one bundle
but the fields become grouped by category , so instead of operating on the bundle level i will
try to hook to field_attach_* to create the grouping effect .

What exactly are you trying

What exactly are you trying to do? Seems like anything you implement yourself will just be reinventing the wheel, this sort of functionality is handled very well by the profile2 module (http://drupal.org/project/profile2)

hook_user_categories

profile2 doesn't support hook_user_categories, and it also depends on entity
but i realize that through the gui profile2 get the job done, but i don't like the api
and depending on entity will never get it into core, and i think it should be in core