mail_domain_get_by_domain doesn't get the email.

Discussion in 'Developers' Forum' started by vaio1, Oct 11, 2011.

  1. dgmufasa

    dgmufasa New Member


    Saw this old thread. Above it mentions:

    The client_id is the same in all functions, it is the unique ID that identifies a client and has to be used in all functions. There is a function to get the client_id by sys_userid of a record. All functions are described in detail in the new api docs.

    OK, how can one get the sys_userid associated with a VAT or a CustomerNo or any other field in the "clients" table?

    Where / how is one supposed to get the sys_userid with the API?

  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Every function returns the sys_userid as part of the record that you get back from a query.
  3. dgmufasa

    dgmufasa New Member

    Thanks for the response.

    I saw this information as well. I thought the sys_userid was set. It seems to be set by who is currently logged in

    There seem to ebe a misunderstanding on what the sys_userid is. the sys_userid is a internal ID used by ispconfig to configure the permissions for records in the database. The sys_userid is the ID of the user that is currently logged into the ispconfig interface (or when the admin created it, then its the userid of the sys_user that is associated with the client that shall own a record) which has created that specific record. So the sys_userid is always the same for all mailboxes of a given domain in ISPConfig.

    That the sys_userid is identical with the sys_groupid in your example is just a coincident.
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    You mix up the remote API with the ISPConfig interface again. Remote API Users are no ispconfig users, the remote API is a low level interface which has admin permissions so it can set the owner of every record. The owner is defined by the client_id that you pass to the add and update functions. The sys_userid and sys_groupid are resolved and set automatically be the remote API for every new/updated record.

Share This Page