Introduction
If you remove WHMCS, or if you move an account to a server without WHMCS, the WHMCS application links remain enabled in the account. To remove these links, you must run two API calls, then manually remove the UI cache.
Note: in these examples, $user
represents the username for which the links will be removed, and $app
represents the individual application link to be removed.
To remove all links for a user
- Remove the integration group:
whmapi1 --output=json remove_integration_group user=$user group_id=whmcs
- Remove the integration links:
whmapi1 --output=json list_integration_links user=$user | /usr/local/cpanel/3rdparty/bin/perl -e 'use Cpanel::JSON; my $json = Cpanel::JSON::Load(<STDIN>); for my $item ( @{$json->{data}->{links}} ) { my $thing = $item->{app}; print qx{whmapi1 remove_integration_link user=$user app=$thing}; };'
- Remove the UI cache:
mv -v /home/$user/.cpanel/datastore/AVAILABLE_APPLICATIONS_CACHE_en_paper_lantern /home/$user/.cpanel/datastore/AVAILABLE_APPLICATIONS_CACHE_en_paper_lantern.bak
To remove a single application link for a user
- Display the application links enabled for the user:
whmapi1 list_integration_links user=$user
- Remove the link for the user:
whmapi1 remove_integration_link user=$user app=$app
- Remove the UI cache for the user:
mv -v /home/$user/.cpanel/datastore/AVAILABLE_APPLICATIONS_CACHE_en_paper_lantern /home/$user/.cpanel/datastore/AVAILABLE_APPLICATIONS_CACHE_en_paper_lantern.bak
Comments
0 comments
Article is closed for comments.