Managing S3 Users in WHMCS -------------------------- This section describes how to manage users in WHMCS in a service provider scenario. New customers will sign up for the service during purchase in your online store and you will need to create users for them in the S3 cluster. Create all files mentioned further in the directory ``whmcs/admin/AcronisStorage``. Creating S3 Users ~~~~~~~~~~~~~~~~~ You can create a user with the ``ostor-users`` service and parameter ``emailAddress`` specifying the user email address. WHMCS creates the user in S3 cluster when you click **Create User**. Create a file ``S3_createUser.php`` with the following contents: :: .. image:: ../../../images/stor_saas_whmcs_integration3.png :align: center :class: align-center Listing S3 Users ~~~~~~~~~~~~~~~~ You can list information about all users with the ``ostor-users`` service. Additional rows may list S3 access key pairs associated with the user. WHMCS lists the users information fetched from S3 cluster when you click **List Users (on/off)**. Create a file ``S3_listUsers.php`` with the following contents: :: .. image:: ../../../images/stor_saas_whmcs_integration6.png :align: center :class: align-center Querying S3 Users ~~~~~~~~~~~~~~~~~ You can display information and status of a user with the ``ostor-users`` service and parameter ``emailAddress`` specifying the user email address. WHMCS displays the user information fetched from S3 cluster when you click **Query User (on/off)**. Create a file ``S3_queryUser.php`` with the following contents: :: .. image:: ../../../images/stor_saas_whmcs_integration5.png :align: center :class: align-center Disabling S3 Users ~~~~~~~~~~~~~~~~~~ You can disable users with the ``ostor-users`` service and parameter ``emailAddress`` specifying the user email address. WHMCS disables read and write access to S3 cluster when you click **Disable User**. Create a file ``S3_disableUser.php`` with the following contents: :: Enabling S3 Users ~~~~~~~~~~~~~~~~~ You can enable a previously disabled user with the ``ostor-users`` service and parameter ``emailAddress`` specifying the user email address. WHMCS enables read and write access to S3 cluster for user when you click **Enable User**. Create a file ``S3_enableUser.php`` with the following contents: :: Deleting S3 Users ~~~~~~~~~~~~~~~~~ You can delete users with the ``ostor-users`` service and parameter ``emailAddress`` specifying the user email address. WHMCS removes the user from S3 cluster when you click **Delete User**. Create a file ``S3_deleteUser.php`` with the following contents: :: Generating S3 Access Keys ~~~~~~~~~~~~~~~~~~~~~~~~~ You can generate a new or additional access key pair with the ``ostor-users`` service and the following parameters: ``emailAddress`` specifying the user email address, ``genKey``. WHMCS generates a new key pair when you click **Generate Access Key**. Create a file ``S3_generateAccessKey.php`` with the following contents: :: .. image:: ../../../images/stor_saas_whmcs_integration4.png :align: center :class: align-center Revoking S3 Access Keys ~~~~~~~~~~~~~~~~~~~~~~~ You can revoke the specified access key pair of the specified user with the ``ostor-users`` service and the following parameters: ``emailAddress`` specifying the user email address, ``revokeKey`` specifying the access key in the key pair. WHMCS removes the key pair when you click **Revoke Access Key**. Create a file ``S3_revokeAccessKey.php`` with the following contents: ::