Skip to Content Skip to Menu

🌟Discover the Joomla AI Plugin that wrote its own story! - CB Editor Assistant 1.1now for Joomla 3, 4 & 5!
✍️ 5-Day Free Trial, then 🎯 save up to 30% with our 🛍️ Intro Offer (First 50 users, ends Dec. 25th)
🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

Filter list

  • saman2
  • saman2
  • OFFLINE
  • Posts: 408
  • Thanks: 7
  • Karma: -1
2 years 3 weeks ago #331825 by saman2
Filter list was created by saman2
hi
i want filter a CB list to show users according my usergroup. for example if UserA in userGroupA and userGroupB he must see all users in userGroupA&B and if UserD registred  in usergroup C he must see all user in usergroupC. how to do that with one list? how to implement with CB list filter(Advanced or basic)? 
i understand in Global tab we have Usergroups setting but in that setting we have not setting like "current usergroup" .

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
2 years 3 weeks ago #331830 by krileon
Replied by krileon on topic Filter list
Add a subquery against _user_usergroup_map based off whatever criteria you need to the advanced filter. Sorry, I cannot help you with custom coding without a business membership .


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: saman2

Please Log in or Create an account to join the conversation.

  • saman2
  • saman2
  • OFFLINE
  • Posts: 408
  • Thanks: 7
  • Karma: -1
2 years 3 weeks ago #331832 by saman2
Replied by saman2 on topic Filter list
thank you but i need only understand how to get current user usergroup? each user must see his teammate (users with he in same usergroup.) is there any substitution to return current usergroup number? i can use advanced and write custom sql for my need but i can not get current user usergroup code. it seems according tool tip of advanced filter, i can not use php and only can use sql.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48616
  • Thanks: 8302
  • Karma: 1446
2 years 3 weeks ago #331834 by krileon
Replied by krileon on topic Filter list
There is, but it's complicated. You can use [gids] but it will be an array converted to a string with values separated by |*|. It's usually best to use the IF substitutions to check for usergroups as it deals with the array handling for you. Example as follows.

[cb:if usergroup includes "2"]I have Registered Usergroup[/cb:if]

Correct, you cannot use PHP there only SQL. That will directly add to the WHERE statement of the query.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: saman2

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum