EnduranceIndia / whmcs-resellerclub-modules

ResellerClub Product Modules for WHMCS
52 stars 44 forks source link

Problem with localapi calls where user 'admin' doesn't exists #3

Closed imagina closed 12 years ago

imagina commented 12 years ago

In some areas you are calling:

$client_order_details = localAPI( 'getclientsproducts', $local_api_values ,'admin');

But if the user 'admin' doesn't exists, the local api call will not work. That's the case in many whmcs installs where the admin user has been renamed or have a different username.

According to http://docs.whmcs.com/API:Internal_API that value is optional if an admin is currently logged in ?

viral-patel commented 12 years ago

Yes ! You're correct ! We can drop 3rd parameter to localAPI function call.

viral-patel commented 12 years ago

3rd parameter of localAPI function call is dropped to allow username of logged in admin to be used by default.