Good Day
I was trying to search for user which have NOT assigned a certain role. I tried different programming operators, but I didn't manage to find anything that worked.
Is there the possibility to have advanced searches when you look for roles (and, or, not etc.) ?
Answers
$RoleModel = new RoleMode(); $UserRoles = $RoleModel->GetByUserID(Gdn::Session()->UserID); $HasRoles=array(); foreach ($UserRoles => $UserRole) $HasRoles[]=$UserRole->Name;Don't PM about development, I'm not currently taking on clients.
grep is your friend.
- Spam
- Abuse
- Troll
1 • Off Topic Insightful 1Awesome LOL •@Aranir you can also do that in phpMyAdmin if you like...
Or you can try the way x00 showed.
If you want to do it in phpMyAdmin, see if you have the tab 'Query' (so Browse, Structure, SQL, Search Query) and there you can make some filters.
What to do if I get a Bonk Error?
Vanilla Wiki : Join and help edit our Wiki! | View all Vanilla issues on GitHub | Report a new Vanilla issue on GitHub
Deploying a new Forum and adding a Theme | Give thanks to the Vanilla Developers!
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Thank you, that is alright if I want to change it from my mysql interface, but i was wondering if the dashboard search would as well allow for such advanced search features (as it is implemented in google).
Or is a mysql query the only way to get these results out?
Thank you both for the answers (and the speed)!
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Like my neighbour above me ^^ says : You only see the actual users, no real search filters, etc. Do it with a pure MySQL query or a special file, see x00's first post in this topic :-)
What to do if I get a Bonk Error?
Vanilla Wiki : Join and help edit our Wiki! | View all Vanilla issues on GitHub | Report a new Vanilla issue on GitHub
Deploying a new Forum and adding a Theme | Give thanks to the Vanilla Developers!
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Shame that it only works for exact matches... a not option would be really handy ^^
Thank you for the clarification :)
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •like I said you could always develop a plugin.
It would be impossible to carry out every possible idea or need that people want and vanilla wouldn't be vanilla if that was the case, it would be a bloated forum software.
Don't PM about development, I'm not currently taking on clients.
grep is your friend.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •everybody who is not a member (roleid=8) in default setup.
SELECT
UserIDFROMGDN_UserRoleWHERERoleIDNOT LIKE '8';factoid: Most questions have been previously answered, try the search box first, please provide your Vanilla version Number!
Peregrine's Addons - donations gladly accepted for "successful solutions" and addons - kind of like tipping a waiter at a restaurant
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Thank you for all the responses, and i think a plugin would be a great solution for this. And i agree that not every little wish can be implemented ^^
But i was just asking to know if that functionality already existed, and i may just had missed it.
thank you all again.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •