CMD_API_SHOW_USER_USAGE for resellers is incorrect

MtK

Verified User
Joined
Aug 2, 2007
Messages
405
Hello,
WHMCS uses CMD_API_SHOW_USER_USAGE to get the user's statistics (bandwidth/quota).

when a user is a reseller, this API gets the top-level user data, and not the entire reseller usage.
this causes (i.e) DA to send an email about quota exceeded while inside WHMCS the user "still has not exceeded"

whmcs_da_usage.png
da_reseller_disk_usage.png
 
Hello,

The CMD_API_SHOW_USER_USAGE returns the User Level stats for a given User, not the Reseller Level stats.

If WHMCS is reporting that info for the usage of a Reseller and all his Users (combined), then the use of CMD_API_SHOW_USER_USAGE by WHMCS is incorrect, and a different command should be used, such as CMD_API_RESELLER_STATS
If the above whmcs_da_usage.png is reporting just the User Level info for the given Reseller, then it's correct.

Note that you can see the same data that the CMD_API_SHOW_USER_USAGE by going to:
User Level -> domain.com -> Site Summary / Statistics / Logs

and that is the User Level stats, as the CMD_API_SHOW_USER_USAGE command is designed to do.
http://www.directadmin.com/features.php?id=435

John
 
after a few tests with the kind help of WHMCS support team, we've found that CMD_API_RESELLER_STATS cannot stat a specific user but the one sending the command.
so if WHMCS using one of the admin's needs to stat a reseller it'd get its own STAT and not the reseller's.


please advise...
 
Hello,

One can always login as any User or Reseller by changing the login format. eg:
PHP:
$reseller = "fred";
$username = "admin|$reseller";
$password = "adminpassword";
which would then be making the call as "fred", with "admin"'s credentials.

John
 
this seems to be a 2 year old issue, that wasn't really fixed at any point...
 
@MtK:

Perhaps my reply to your other thread is a bit premature; perhaps there should only be one thread.

I only use one admin, and I guess I don't understand the issue.

My understanding is that logged in as a reseller, DirectAdmin can show any user of that reseller, including reseller itself. So I'm not sure what you're looking for.

And I don't understand your point about it being a two-year-old issue. Doesn't John's answer give you what you need?

Can you be ,more specific, with examples?

Thanks.

Jeff
 
Back
Top