Lock user or disable user service with API

Discussion in 'Developers' Forum' started by laptop_user, Jan 30, 2015.

  1. laptop_user

    laptop_user Member

    As the title suggest is it possible to lock user or disable user service with API? I check the remoting client script but couldn't find any parameter that support that feature. Currently admin can do both with Edit Client page.

    Thanks in advance
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The function to lock all services of a client at nce is not avalable trough the api yet.
     
    laptop_user likes this.
  3. laptop_user

    laptop_user Member

    Thanks for your reply. I try to lock user from login by updating the cancel column in table client to 'y' but I test it and I still can login. Is there any other table I should update to prevent user login?

    Thanks in advance.
     
  4. laptop_user

    laptop_user Member

    This is how I did it:

    PHP:
    UPDATE `client`, `sys_userSET `client`.`locked` = ?, `sys_user`.`active` = ? WHERE `client`.`client_id` = ? AND `sys_user`.`client_id` = ?
    Although I'm not so sure whether this change will be reflected in multiserver setup. From my reading I believe that if you have only 1 database server, this change should be fine.
     

Share This Page