lims Posted March 20, 2019 Share Posted March 20, 2019 i want for custom this function is work, version 7.7.1 all login user client area sidebar and admin link button go to root Hostname... not go to hostsname in configservers and how to make custom hostname will work ? any idea... ? regards 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 20, 2019 Share Posted March 20, 2019 in terms of the client sidebar, if you want to change the URL of the cPanel/Webmail links... I suspect the admin area would require another hook too as there isn't a template to work with on the products page in the client's summary. 1 Quote Link to comment Share on other sites More sharing options...
lims Posted March 20, 2019 Author Share Posted March 20, 2019 6 minutes ago, brian! said: in terms of the client sidebar, if you want to change the URL of the cPanel/Webmail links... I suspect the admin area would require another hook too as there isn't a template to work with on the products page in the client's summary. thank so much @brian! this hook work for client area 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Staff WHMCS Peter Posted March 20, 2019 WHMCS Staff Share Posted March 20, 2019 Hi @lims, The reason this currently works in the way it does is because WHMCS sends a request via the cPanel API to the "create_user_session" endpoint. At current, the "url" which is returned defaults to the server hostname. This is what is used to redirect the user to cPanel Here's an example of what we receive back from cPanel: { "data": { "cp_security_token": "/cpsess1234567890", "expires":1401993893, "session": "username:GHehYZ1GCxzmDATMmT1xT4rN0tiPGMWnKErPJdU3t6AGBx2LjQ3qB6Xih5naUh_4:create_user_session, 5dc619831bac4aa2e014e062d762645e8447949eaef14fc53a8ce2b1e0e2592a", "url": "https://example.com:2083/cpsess1234567890/login/? goto_uri=frontend%2fx3%2fstats%2fawstats_landing.html&locale=fr&session=username:%3aGHehYZ1GCxzmDATMmT1xT4rN0tiPGMWnKErPJdU3t6AGBx2LjQ3qB6Xih5naUh_4%3acreate_user_session%2c5dc619831bac4aa2e014e062d762645e8447949eaef14fc53a8ce2b1e0e2592a", "locale":"fr", "service": "cpaneld" }, "metadata": { "version": 1, "reason": "Created session", "result": 1, "command": "create_user_session" } } As you can see, the "url" element is absolute. We simply redirect to this link. I do note in the cPanel documentation that it is now possible to set a "preferred_domain" variable when contacting this endpoint, making it possible to redirect to a users own domain. Therefore I would encourage you to please submit a request to our feature requests tracker where other users can contribute to and vote on your idea. Ideas with the most votes and activity do get reviewed by our team. http://requests.whmcs.com 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.