Jump to content
jesus614

help change link logon cpanel of the sidebar area of clients

Recommended Posts

hello in created a hook with the name file.php in the path includes / hook and placed the following code:

<?php

use WHMCS\View\Menu\Item as MenuItem;

add_hook('ClientAreaPrimarySidebar', 1, function(MenuItem $primarySidebar)
{

$service = Menu::context('service');    
$domain = $service->domain;

if (!is_null($primarySidebar->getChild('Service Details Actions'))) {
            $primarySidebar->getChild('Service Details Actions')
                           ->getChild('Login to cPanel')
                           ->setUri('http://'.$domain.'/cpanel');
            $primarySidebar->getChild('Service Details Actions')
                           ->getChild('Login to Webmail')
                           ->setUri('http://'.$domain.'/webmail');
   }
});

 

Now when logging in as a client and clicking on login to cpanel nothing was modified.

I want the link to send to the domain of the client / cpanel (the client must place their credentials).

Share this post


Link to post
Share on other sites
2 hours ago, jesus614 said:

I want the link to send to the domain of the client / cpanel (the client must place their credentials).

try the second hook I posted in that original thread - that one still works.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

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