API: need a way to add an aditional domain to a user

Maxnet

New member
Joined
Jan 6, 2004
Messages
3
I have a feature request.

I would like to be able to use the API to add additional domains to existing user accounts.

Right now there is CMD_API_DOMAIN
But as far as I can tell, you can only use that when you login to the API using the user's username and password.
I would like to access the API as admin, and without knowing the end-user's password, add domains to their account.
 
Hello,

Use the "login-as" option to accomplish that. You'll still use the CMD_API_DOMAIN function normally as with the login-as option, it will appear as though you're logged in as the end-user, but you'll be using the admin password instead.

eg:
Code:
$username = "admin|[b]bob[/b]";
$password = "[b]adminspass[/b]";
where bob is the DA user you're trying to login with.

This is the exact same as using the "Login as bob" button in List Users -> bob -> "Login as bob"

except, for the API.

John
 
Thanks.

Perhaps you could add the information to the main API documentation page as well, for others that do not read the forum.
 
Back
Top