Add additional where query into the Backend USer List?

6 years 8 months ago #295965 by tonypartridge
Hello,

I need to add a where query into the backend. I was previously doing this with:
$superAdmin = Application::MyUser()->isSuperAdmin();
                if($this->registryEditVew->_controllerView->_tableName == "showusers" && !$superAdmin){
                    $mygids = $_CB_framework->acl->get_groups_below_me( null, true );
                    $xmlsql->where[] = "d.group_id IN('".implode("','", $mygids)."')";
                }

in CB2.0, but get_groups_below_me has been dropped so I've adjusted it to use MyUser() get groups/ but then we get an issue accessing the protected property $xmlsql->where[].

Can you advise on what we should be using, of is there are some plugin hooks we can hook into and add the additional where clause?

Please Log in to join the conversation.

6 years 8 months ago #295996 by krileon
CB > User Management doesn't allow you to edit users below you. Even Joomla doesn't hide them, but simply blocks edit as CB does. At any rate to add something like that you'd have to make the changes in the XML by editing the core file directly or writing a plugin to alter it with the plugins own XML override. There is no trigger for what you're trying to do.


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.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.168 seconds

Facebook Twitter LinkedIn