azureblue Posted September 29, 2016 Share Posted September 29, 2016 Hello! I'd like to disable my client's ability to Manage DNS functions and setup Email Forwarding when they login to their client areas. In my WHMCS admin control panel under the client's "Domains" tab, I have unchecked "DNS Management" and "Email Forwarding" options for "Management Tools". It is my understanding that this would disable these functions in the client area. When I view the client area for this customer, it still gives them the ability to use these functions. I've searched the forums and Docs and haven't really found an answer. Can someone let me know if I am missing a step? What are these checked or unchecked options supposed to do? And how do I disable these features in the client area? Thank you 0 Quote Link to comment Share on other sites More sharing options...
azureblue Posted October 1, 2016 Author Share Posted October 1, 2016 I went to Setup > Products/Service > Domain Pricing and unchecked DNS Management and Email Forwarding from all the TLDS. Also did an exhaustive one by one manual unchecking of these 2 for every domain in each client's account. I also found the code in clientareadomaindetails.tpl and just deleted all the code for DNS Management and Email Forwarding. 0 Quote Link to comment Share on other sites More sharing options...
twhiting9275 Posted October 1, 2016 Share Posted October 1, 2016 Keep in mind that you'll need to do this every time you upgrade (the template edits) unless you specifically create a custom template. You could also do a hook that removes those from the sidebar menu, something like this <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $primarySidebar) { if (!is_null($primarySidebar->getChild('Domain Details Management'))) { $primarySidebar->getChild('Domain Details Management') ->removeChild('Manage Email Forwarding'); $primarySidebar->getChild('Domain Details Management') ->removeChild('Manage DNS Host Records'); } }); ?> Copy that , save it as a php file in your whmcs/includes/hooks directory Using hooks is the preferred way to deal with this going forward. It used to be that this could be done through template edits, and it still can. Using a hook, however, you don't have to go through and redo those template edits every time you update. It just makes this so much easier . 0 Quote Link to comment Share on other sites More sharing options...
azureblue Posted October 1, 2016 Author Share Posted October 1, 2016 Hi! Good to know this. I did create a custom template, but I'm definitely going to add this. Learning something new today. Thank you so much! 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.