Jump to content

Disable cPanel Login in WHMCS 6


expresstech

Recommended Posts

I am reseller and I want 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!

 

<?php
/**
* Remove cPanel Login from WHMCS Client Area
*
* @package    WHMCS
* @author     Express Tech <hi@expresstech.io>
* @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 WHMCS\View\Menu\Item 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

Screen Shot 2016-12-17 at 2.53.17 PM.png

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