Mouth
Well-known member
- Affected version
- 2.2.7
I have the following user group settings ....
... and the following user ...
... this member (and members in the 'Banned Users (20)' user group, that being their highest user group display priority) should adhere to this user group's (Banned, 20) display styling ...
... but because the above 'User banner text field for user group (Banned,20) is empty, xF is instead dropping back to the next highest user group (Registered,2) and using its 'User banner text'. The same also occurs if the 'user title override - use the following user title:' field is empty.
For example ...
... the User Title is correct, coming from the (Banned,20) user group, but the Banner Text (and styling) is incorrect, instead coming from the (Registered,2) user group ....
Likewise, if I empty the User Title field for the (Banned,20) user group, the member will instead display the User Title from (Registered,2) user group.
TL;DR / Bug ... If the User Title text and/or User Banner text is empty in a members highest display priority user group, xF will instead use the lower (next highest display priority) user group's User Title text and/or User Banner text.
SQL:
mysql> select user_group_id, title, display_style_priority, user_title, banner_text from xf_user_group where display_style_priority > 0 order by display_style_priority asc;
+---------------+----------------------------+------------------------+----------------+----------------+
| user_group_id | title | display_style_priority | user_title | banner_text |
+---------------+----------------------------+------------------------+----------------+----------------+
| 1 | Unregistered / Unconfirmed | 5 | Guest | |
| 2 | Registered Users | 20 | I'm New Here | Newcomer |
| 25 | Established Members | 50 | Member | Member |
| 17 | Premium Members | 100 | Premium Member | Premium Member |
| 22 | Vendors | 150 | Vendor | Vendor |
| 32 | In Memoriam | 600 | In Memoriam | In Memoriam |
| 20 | Banned Users | 700 | ** Banned ** | |
| 4 | Moderators | 900 | Moderator | Moderator |
| 3 | Administrative Users | 1000 | Administrator | |
+---------------+----------------------------+------------------------+----------------+----------------+
9 rows in set (0.00 sec)
... and the following user ...
SQL:
mysql> select username, custom_title, user_group_id, secondary_group_ids, is_banned from xf_user where user_id = 84345;
+----------+--------------+---------------+---------------------+-----------+
| username | custom_title | user_group_id | secondary_group_ids | is_banned |
+----------+--------------+---------------+---------------------+-----------+
| shineb99 | | 2 | 20 | 1 |
+----------+--------------+---------------+---------------------+-----------+
1 row in set (0.00 sec)
... this member (and members in the 'Banned Users (20)' user group, that being their highest user group display priority) should adhere to this user group's (Banned, 20) display styling ...
... but because the above 'User banner text field for user group (Banned,20) is empty, xF is instead dropping back to the next highest user group (Registered,2) and using its 'User banner text'. The same also occurs if the 'user title override - use the following user title:' field is empty.
For example ...
... the User Title is correct, coming from the (Banned,20) user group, but the Banner Text (and styling) is incorrect, instead coming from the (Registered,2) user group ....
Likewise, if I empty the User Title field for the (Banned,20) user group, the member will instead display the User Title from (Registered,2) user group.
TL;DR / Bug ... If the User Title text and/or User Banner text is empty in a members highest display priority user group, xF will instead use the lower (next highest display priority) user group's User Title text and/or User Banner text.