Hi, I've made my own "connector" between my Invoice Software and ISPConfig. Simply - script check if Client paid or not. If not I'd like to Lock Account (screenshot attached). I know that I cold set it in database directly, but I don't think it will work. What Kind of SQL (or other way) is equal to setting CHECKBOX? Thanks
not sure you can do that using sql... not sure the field change would be picked up.. would probably be better to use the api.. download and extract the ispconfig tarball.. the api details / examples are in the remoting_client folder. i believe the most relevant example would be client_update.php changing $client_record['locked'] = '*'; to n or y depending on whether you want to lock or unlock the account.
If I remember correctly, there is currently no API implementation for locking a client. Doing it by SQL will not work and there are no API function for this as setting locked in params array on client update will likely not work as the code is in the interface form only (as far as I know) and not in a plugin which could be triggered by the API too. So basically, you would have to mimic the function by using the API and set e.g. websites, mail accounts etc. that you like to lock to inactive state (similar to what the GUY is doing).