Jump to content

Domain Management Tools still show up in Client area?


azureblue

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 .

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated