notdonski Posted June 8, 2017 Share Posted June 8, 2017 I've been trying to find a way to change client's status from Inactive to Active without going through the admin panel. I looked through the API and there doesn't seem to be a way to do it. Is it safe to just update the status in tblclients? Anything else I should do/consider? Thank you. 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted June 8, 2017 Share Posted June 8, 2017 Is it safe to just update the status in tblclients? yes it's safe to do it this way 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted June 8, 2017 Share Posted June 8, 2017 Anything else I should do/consider? remember to check your automation settings too - otherwise the cron might undo what you are changing the next time it runs. http://docs.whmcs.com/Automation_Settings#Client_Status_Update WHMCS automatically sets clients with no active products/services to Inactive status, this helps you to distinguish and filter clients effectively. However you can stop WHMCS from doing this by changing this setting. More information on this feature is available in Client Management. Disabled - The status of a client will not be changed automatically Change client status based on active/inactive products - If a client has no active or suspended products/services then their account will automatically be set to Inactive status when the cron job next runs. Change client status based on active/inactive products and not logged in for longer than 3 months - In addition to the above option, a client's account will only be set to inactive when their last login date was over 3 months ago. 0 Quote Link to comment Share on other sites More sharing options...
notdonski Posted June 9, 2017 Author Share Posted June 9, 2017 Thank you for your replies. - - - Updated - - - remember to check your automation settings too - otherwise the cron might undo what you are changing the next time it runs. http://docs.whmcs.com/Automation_Settings#Client_Status_Update Thanks, I'm aware of this. What I'm trying to achieve is actually to counter this, without waiting for next cron run to re-enable the client. 0 Quote Link to comment Share on other sites More sharing options...
notdonski Posted June 23, 2017 Author Share Posted June 23, 2017 Followup question: What's the best way to tell if a client's status has been changed to Inactive by the cron job? It doesn't seem to trigger the ClientEdit event/hook unfortunately. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted June 27, 2017 Share Posted June 27, 2017 What's the best way to tell if a client's status has been changed to Inactive by the cron job? It doesn't seem to trigger the ClientEdit event/hook unfortunately. I would have thought one way would be to check the 'updated_at' value in the tblclients table and see if the time is close to when your cron would run, or perhaps easier to query the activity log as that will likely show a change in client status. 0 Quote Link to comment Share on other sites More sharing options...
digifx Posted January 6, 2020 Share Posted January 6, 2020 (edited) *** Edited January 6, 2020 by digifx wrong thread 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.