raamee Posted January 29, 2013 Share Posted January 29, 2013 How to close customer accounts of certain products ( like VPS), I need only those product clients accounts to be closed. Currently there is no facility to do this in whmcs. Any one help? 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted January 29, 2013 Share Posted January 29, 2013 With a cron php + query. Quite easy. 0 Quote Link to comment Share on other sites More sharing options...
raamee Posted January 30, 2013 Author Share Posted January 30, 2013 With a cron php + query. Quite easy. Could you please explain and share the script? 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted January 30, 2013 Share Posted January 30, 2013 (edited) The script does not exist. It's in my mind anyway this is the query UPDATE tblclients t1 LEFT JOIN tblhosting t2 ON t1.id = t2.userid SET status = '[b]Closed[/b]' WHERE t2.packageid = '[b]8[/b]' AND t2.domainstatus = '[b]Active[/b]' With this i close all clients with package id (aka product id) equal to 8 only if their service is Active. So let's say that you want to close all clients with "My super hosting" package (id = 10). Change 8 to 10 and run this query with a scheduled task (cron job). That's it. Edited January 30, 2013 by Kian 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.