cPanel XMLAPI - suspendacct


DESCRIPTION

This function will suspend an account.


VARIABLES

INPUT

user
Name of the user to suspend.

reason
Reason for suspension.

OUTPUT

suspendacct
Account suspension container

result
Results container

status (boolean)
Whether or not the operation succeeded. Yes=1, No=0.

statusmsg (string)
Any message related to the result of the operation. Format statusmsg=``message''


EXAMPLES

Calling this URL in WebHost Manager: /xml-api/suspendacct?user=bob&reason=no%20payment

will produce XML similar to:

<suspendacct>

<result status=``1'' statusmsg=``Changing Shell to /bin/false...Changing shell for bob. Shell changed. Done Locking Password...Locking password for user bob. passwd: Success Done Suspending email account logins for domain.com .... Done Notification => contactemail@domain.com via EMAIL [level => 3] Suspending FTP accounts... Updating ftp passwords for bob Ftp password files updated. Ftp vhost passwords synced bob's account has been suspended ''/>

</suspendacct>

Note that this will not delete the account, only suspend it's cPanel and email access.


COPYRIGHT

Copyright 2007 cPanel Inc.