DirectAdmin API Suspend incorrect

thunn

Verified User
Joined
Mar 13, 2012
Messages
166
Hello,

I'm trying to suspend an account (And I don't know real state of that account is suspended or not).
I do exact as example:
$sock->query('/CMD_SELECT_USERS',
array(
'location' => 'CMD_SELECT_USERS',
'suspend' => 'Suspend', // note - this can also be 'Unsuspend'
'select0' => '{user}'
));
$result = $sock->fetch_body();

But I'm very surprise that if that account is Suspended, then it will be Unsuspended and vice versal.

Can you give me of how to prevent unsuspend automatically? I always use 'suspend' => 'Suspend'

Thank you very much.
 
Seems like the API is not up2date

if i use: CMD_API_SELECT_USERS

Result: Array ( [error] => 1 [text] => Cannot Execute Command [details] => Empty post )

If i use CMD_SELECT_USERS it works just fine. What do i miss?
 
Back
Top