Api request and strange sys_userid

Discussion in 'General' started by themark, Apr 24, 2014.

  1. themark

    themark Member


    i'm looking to populate the customer db data (basically the email address) of ispconfig, fetching the data from an external db.

    What I need to do, it's extract a specific user starting from a domain.
    This could be pretty easy to do with a simple query, but i saw strange stuff on the db.

    If i'm going to the web_domains table I saw for every of my domains created (sys_userid=1), that can't be possibile because, on the interface, the domains are correctly divided for all the customers.
    Instead the sys_groupid change with every domain (so sys_userid=1 for any domains and sys_groupid different for any).

    I can't figure out, how extract them starting from the username or the user_id...

    I have checked deeper also via the API, but the method proposed (client_get_sites_by_user) require as parameter the sys_userid and sys_groupid...

    Any suggestion?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    the sys_userid is the user that created the site, in your case they were created by you (the admin). If the client had created the site himself, then this would be he sys_userid of the client. The sys_groupid is the group of the client that owns the site.
  3. themark

    themark Member

    Ok but in this case (so me i have created the website for the customer and then setup the customer as customer of the website) how can extract all the domain of a specified customer (via the apis for example...)?

    Because if I pass sys_userid=1 obviously the system extract all the domains of the db...


Share This Page