Child pages
  • WHM API 0 Functions - unsuspendacct
Skip to end of metadata
Go to start of metadata

 

Description

This function unsuspends an account.

Note:

Only the root account and root-enabled resellers can unsuspend a locked account.

Examples 


 JSON API
https://hostname.example.com:2087/cpsess##########/json-api/unsuspendacct?user=username
 XML API
https://hostname.example.com:2087/cpsess##########/xml-api/unsuspendacct?user=username
 Command Line
whmapi0 unsuspendacct user=username


Notes:

  • You must URI-encode values.
  • For more information and additional output options, read our Guide to WHM API 0 documentation or run the whmapi0 --help command. 
  • We introduced this functionality in cPanel & WHM version 11.52.0.8.

 Output (JSON)
{
   "result":[
      {
         "status":1,
         "statusmsg":"<script>if (self['clear_ui_status']) { clear_ui_status(); }</script>\n
Changing shell for user123.\nShell changed.\nUnlocking password for user user123
.\npasswd: Success.\nUpdating ftp passwords for user123\nFtp password files updated.
\nFtp vhost passwords synced\nuser123's account is now active\nUnsuspending mysql
users\nNotification => admin@example.com via EMAIL [level => 3]\n"
      }
   ]
}
 Output (XML)
<unsuspendacct>
    <result>
        <status>1</status>
        <statusmsg>
            <script>if (self['clear_ui_status']) { clear_ui_status(); }</script>
            Changing shell for user123.
            Shell changed.
            Unlocking password for user user123.
            passwd: Success.
            Updating ftp passwords for user123
            Ftp password files updated.
            Ftp vhost passwords synced
            user123's account is now active
            Unsuspending mysql users
            Notification => admin@example.com via EMAIL [level => 3]
        </statusmsg>
    </result>
</unsuspendacct>

Parameters

ParameterTypeDescriptionPossible valuesExample
userstring

Required

The account to unsuspend.

A valid cPanel or WHM username on the server.username

 

Returns

ReturnTypeDescriptionPossible valuesExample
resultarray of hashesAn array of hashes of function informationThis hash includes the status and statusmsg returns. 

status

Boolean

Whether the system successfully called the function.

The function returns this value in the result hash.

  • 1 — Success.
  • 0 — Failure.

 

1

statusmsg

string

A message of success or a reason for failure.

The function returns this value in the result hash.

 

  • A message of success.
  • An error message.
 Click to view...
<script>if (self['clear_ui_status']) { clear_ui_status(); }</script>
             Changing shell for user123.
             Shell changed.
             Unlocking password for user user123.
             passwd: Success.
             Updating ftp passwords for user123
             Ftp password files updated.
             Ftp vhost passwords synced
             user123's account is now active
             Unsuspending mysql users
             Notification => admin@example.com via EMAIL [level => 3]