ISPConfig External Access

Discussion in 'Developers' Forum' started by artinfo, Apr 2, 2024.

  1. artinfo

    artinfo Member

    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
     

    Attached Files:

  2. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    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.
     
    ahrasis likes this.
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    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).
     
    ahrasis likes this.
  4. artinfo

    artinfo Member

    Thanks Guys... that would be useful api option for me.. will try to use @till way...
     

Share This Page