|
|||
|
I'm trying to understand why my primary user on a WHM server is unable to get a listing of a domain in a separate account. I think I don't understand the different relationships between users and WHM accounts. Here's the situation:
I have a WHM account with a user "user1". In this WHM account there are two cPanel accounts (sorry if I'm using the wrong words here). The first is for domain "mydomain1.com" and the second is for "mydomain2.com". The primary user for the "mydomain1.com" account is "user1" and the primary user for the "mydomain2.com" account is "user2". So: WHM Account >> "user1" "mydomain1.com" >> "user1" "mydomain2.com" >> "user2" Now, I'm using the Email::listpopswithdisk to try and retrieve email accounts for a domain. The problem is when I login as "user1" with the API and try to retrieve email accounts for "mydomain2.com", I get nothing back. This kind of makes since that account is owned by "user2". But what confuses me then is why one of the arguments for this API call is "domain" when the logged in user can apparently only access the domain of their own account (even if the user is the WHM account holder). I know this is a convoluted question but I can't think of a better way to ask it. Any help getting me to understand would be very much appreciated. Thanks, Karim |
|
||||
|
Quote:
__________________
Need technical assistance? You can find your best avenue for support at: http://support.cPanel.net -- cPanel David G., Lead Forum Administrator & cPanel Technical Sales Representative |
|
|||
|
Thanks for the response. To answer your question, it doesn't seem to matter what the "user" parameter is - I don't even have to supply a user and I still get back the email accounts associated with the authenticated user (as opposed to the one in the url parameter list).
|
|
||||
|
Quote:
__________________
Need technical assistance? You can find your best avenue for support at: http://support.cPanel.net -- cPanel David G., Lead Forum Administrator & cPanel Technical Sales Representative |
|
||||
|
Quote:
When you use the cPanel ports, you will only be able to access things for the cPanel user you are logged in as. However, with using the WHM ports, you can login as a reseller and then get information about the cPanel accounts that are under your reseller account.
__________________
Need technical assistance? You can find your best avenue for support at: http://support.cPanel.net -- cPanel David G., Lead Forum Administrator & cPanel Technical Sales Representative |
|
||||
|
As this is an API1/API2 call, this needs to be done for each individual cPanel user. However you could probably use the XML API's listaccts function to get a list of all cPanel accounts for that reseller and then loop through each account to get the information you need for every WHM account owned by that reseller.
__________________
Need technical assistance? You can find your best avenue for support at: http://support.cPanel.net -- cPanel David G., Lead Forum Administrator & cPanel Technical Sales Representative |
![]() |
| Tags |
| api2 |
| Thread Tools | |
| Display Modes | |
|
|