Since this contribution is about “usertypes”, a short explaination is perhaps in order.
IMPORTANT BASIC FACTS
- The “usertype” field in table #__users is a legacy field from Joomla! before 2.5.
- In a pure Joomla! 2.5 usage, it is either empty, or set to 'deprecated' for a “Super User” (formerly “Super Administrators” before Joomla! 2.5).
Once set, it is NO MORE UPDATED by Joomla! 2.5 (unless a user becomes, or ceases to be, a “Super User”).
- Nevertheless, CB DOES UPDATEÂ this field (in a manner described below) AS FAR AS CB USER MANAGEMENT/REGISTRATION IS USED instead od Joomla! 2.5 User Management/Registration.
- Therefore, as far as CB User Management/Registration is used, and as far as the limitations of the usertype determination by CB are under control (see below), IT MAKES SENSE TO USE THIS FIELD to show the “main group” of the user. This applies especially to CB lists, which prove convenient (for most usages) to display the “main group” of each listed user.
- Remind that in Joomla! 2.5, the group names, hence the “usertype” field, are LANGUAGE-DEPENDENT strings, depending upon the language USED FOR THE INSTALLATION of Joomla!.
Thus, for a given user, the “usertype” field does NOT change when loging in with a different language, although the entire site does update for the new language!
USERTYPE MANAGEMENT in CB
The way CB sets the “usertype” field is very simple:
- If the user is in the “Super User” group (“Super Administrator” before Joomla! 2.5),
usertype = “Super User” (in EN, or else translated into the installation language, eg. “Super Utilisateur” in FR)
- Else, if the user is in the “Administrator” group,
usertype = “Administrator” (in EN, or else translated into the installation language, eg. “Administrateur” in FR)
- Else, if the user is in the “Manager” group,
usertype = “Manager” (in EN, or else translated into the installation language, eg. “Gestionnaire” in FR)
- Else
usertype = the LAST group in the user's group list (translated into the installation language)
Now one may wonder what “the last group” precisely means...
VERY IMPORTANT WARNING
The “last” group in CB usertype determination is actually the “lowest selected group in the list”, ie. the selected group of highest order number in the list of available user groups.
This is a user-interface notion, and
HAS NOTHING TODO WITHIN ANY HIERARCHICAL POSITION of the group with respect to the other groups.
Consider for instance the following two selection cases, based on the same user-interface presentation, where
means the group is selected:
Case A:
group 1
group 11
group 2
group 21
Case B:
group 1
group 11
group 2
group 21
Here the user will have usertype “group 2” in case A and “group 21” in case B, which is a non-symmetric determination.
One would expect the usertype to be the same if the ORDER is changed, ie. if the presentation is changed to
group 2
group 21
group 1
group 11
Clearly, with this new presentation the usertype determination is the same in case B but NOT in case A !!!
==> ONE MUST BE AWARE OF THIS LIMITATION (as of 1.8.1) WHEN CONSIDERING THE usertype IN CB.
For a full acount of this issue, see Usertype management in CB.
[EDIT 24-Dec-2012] Resources removed as topic deprecated.