The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
User color and badg...
 
Share:
Notifications
Clear all

User color and badge do not take into consideration multiple roles if the user has multiple roles assigned

3 Posts
2 Users
0 Reactions
735 Views
Posts: 23
Topic starter
(@remiel)
Eminent Member
Joined: 4 years ago

Consider the following scenario:

A user has two roles assigned: Subscriber and Supporter (with the latter being of higher priority)

In settings, subscribers are set to correspond to green color and not to have a user badge showing. But Supporters are set to show user badge and be colored in pink.

In this scenario, an expected behavior would be for the comments of that user to have a pink Supporter badge. But what actually happens is that the user is still treated as a Subscriber - they are green without any badge.

 

I temporarily changed my site to switch user roles instead of adding a new role, so it isn't anything problematic for me, but I wanted to let you guys know because there might be others who have a real need for multiple roles per user.

2 Replies
Asti
Posts: 7617
 Asti
Support
(@asti)
Illustrious Member
Joined: 7 years ago

Remiel,

I'm really sorry, but it'd be too hard to detect the role with high priority. wpDiscuz always gets the first user role. 

Reply
1 Reply
(@remiel)
Joined: 4 years ago

Eminent Member
Posts: 23

@asti I understand. Just throwing out some things you could do that might be easier implementation wise:

  • how about showing the first role of the assigned roles that actually has a badge?
  • how about adding a setting in the user badges menu that will allow the admin to assign a priority number to the roles? That way, when deciding what badge and color to assign, wpDiscuz can take into account the priority number. 

Again, it's not a big issue and there are certainly more important things for you guys to work on. Just wanted to put it out there.

Reply
Share: