micha80
10 years agoExpert
Condition for more then one role
Hi,
I want to generate a custom leaderboard based on role conditions. The Leaderboard should only show member which have two specific roles assigned. For this I gave the API v2 a chance and created the following query:
SELECT * FROM users WHERE roles.name = 'Role1' AND roles.name = 'Role2'
But the API is not working as expected. The AND condition is working like an OR condition. This means I get all user which have Role1 or Role2 assigned. But not a list of users which have both assigned.
Do I something wrong? Is there another way to reach the goal?
Regards,
Michael