Suspend user programatically

Chema

Verified User
Joined
Jun 5, 2008
Messages
7
Hello,

I need to know how can I suspend a user via a shell script. I've seen the PHP class to interoperate with DA but I think is too complicated for me.

Any way to suspend a user via a simple command? If this is not possible, please, explain for *dummies* how can I integrate the PHP class of lordphil in a shell script.

Thanks in advance.
 
I have the same problem, how to suspend user from command line?

Hello,

I need to know how can I suspend a user via a shell script. I've seen the PHP class to interoperate with DA but I think is too complicated for me.

Any way to suspend a user via a simple command? If this is not possible, please, explain for *dummies* how can I integrate the PHP class of lordphil in a shell script.

Thanks in advance.
 
@Bilik: I think is not possible, because Linux shells, like BASH, has no capabilities to interact with the HTTP protocol at socket level. Finally, I programmed the module in pure PHP code and it works with the PHP class for DirectAdmin by Lordphil.

You can call the PHP script via command line:

php suspend_user.php

You could put the previous line in a task scheduler like the Unix Cron. Download the PHP class and the examples. There are 1 example showing how to suspend a user. Edit the required data in the sample script and call it in a Cron and you are done.
 
Back
Top