Tutorials

Removing Login to cPanel from WHMCS 6 Client Area

As a reseller and I wanted to hide SSO logins (both Login to cPanel button in sidebar and also the Quick shortcuts in client area product details).

I searched this forum for a solution, but found only partial answers, so here I am with a good solution (which worked for me, WHMCS 6.x)

Remove Quick Shortcuts

You need FileManager / FTP for this. Copy the tpl file located at /modules/servers/cpanel/templates/overview.tpl and paste it in your template folder at the following path – /templates/yourtemplatename/modules/servers/cpanel/overview.tpl (here your template name will probably be five or six and you may need to create folders modules/servers/cpanel, because they are not present by default).

Now, edit the line # 137 to look like this (just add && 0)

{if $systemStatus == 'Active' && 0}

Basically, you have created a override template file which overrides the default functionality and removes the Quick Shortcuts etc in the client area.

Read more at Working with Module Templates

Remove Login to cPanel in Sidebar

This bit is fairly easy, no need to edit any tpl files etc. Just create an empty file at /includes/hooks folder (name it expresstech_cpanel_removal.php) and paste the following content. Done!


* @copyright  Copyright (c) WHMCS Limited 2005-2013
* @license    http://www.whmcs.com/license/ WHMCS Eula
* @version    $Id$
* @link       http://www.whmcs.com/
*/

if (!defined("WHMCS"))
die("This file cannot be accessed directly");

use WHMCSViewMenuItem as MenuItem;

// Add social media links to the end of all secondary sidebars.
add_hook('ClientAreaPrimarySidebar', 1, function (MenuItem $primarySidebar)
{
    if (!is_null($primarySidebar->getChild('Service Details Actions'))) {
         $primarySidebar->getChild('Service Details Actions')->removeChild('Login to cPanel');
    }

});

Read more at Client Area Sidebar Cheatsheet

whmcs

Vikas Singhal

Vikas is the founder of ExpressTech. He has a deep passion towards creating usable products which business/customers love. He is building an awesome team @ ExpressTech. Come join us.

Leave a Reply

Your email address will not be published.

Privacy Settings
We use cookies to enhance your experience while using our website. If you are using our Services via a browser you can restrict, block or remove cookies through your web browser settings. We also use content and scripts from third parties that may use tracking technologies. You can selectively provide your consent below to allow such third party embeds. For complete information about the cookies we use, data we collect and how we process them, please check our Privacy Policy
Youtube
Consent to display content from Youtube
Vimeo
Consent to display content from Vimeo
Google Maps
Consent to display content from Google
Spotify
Consent to display content from Spotify
Sound Cloud
Consent to display content from Sound