• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

CCCSSS

New Pleskian
Hello, everyone! I am trying to remove a certain user from a certain database using their IDs.

Basically, my aim is to have 2 sets of databases. The first set will always consist of the same few databases. The second set will have databases dynamically created into and deleted out of it. I am using XML packets to do this. Everything was going well. My problem came in at removing certain users from having access to the first set of databases. The code in the this documentation page seems incomplete for that task...

Knowing the database id and user id, I tried this XML packet code and it is giving me an error. When I remove "<db-id>2</db-id>," the code works … and deletes the user entirely.

Anyone can tell me what's wrong with this xml packet code, or do I just need to find another way?

Code:
<packet>
<database>
   <del-db-user>

      <filter>
          <id>55</id>
          <db-id>2</db-id>
      </filter>

   </del-db-user>
</database>
</packet>
Error:
Code:
[system] => Array
        (
            [status] => error
            [errcode] => 1014
            [errtext] => Parser error: Request is invalid. Error in line 6: Element 'db-id': This element is not expected. Expected is ( id ).
        )



The documentation says:

This request packet removes the user with ID 55 from the database with ID 2.
Code:
<packet>
<database>
   <del-db-user>

      <filter>
          <id>55</id>
      </filter>

   </del-db-user>
</database>
</packet>

Where is this ID of 2, haha? I noticed that this particular page in the documentation has missing and incorrect info, as if parts had been copied and pasted. No disrespect to the author of the page.
 
I think the flow chart in the documentation is an exclusive "or", so either use id or use db-id. Have you tried that?
 
The documentation isn't very clear and on some points, sadly, even contradictory. The del-db-user operation however completely deletes a user. It does not remove a user from a specific database. There is no need to specify a database, as the operation deletes the user regardless of which database the user belongs to.

I get your confusion as the documentation wrongly and confusingly states:
This request packet removes the user with ID 55 from the database with ID 2.
It should state that it deletes the user with ID 55.

As for you objective I am afraid you cannot remove certain users from having access to particular databases using the XML API.
 
Back
Top