Skip to content

WHMCS‐Pterodactyl Sync Setup

Aleksandar Ovcharov edited this page Mar 13, 2024 · 1 revision

Configuration for Sync between WHMCS & Pterodactyl

To integrate PteroSync with WHMCS effectively, it's recommended to adjust the following configurations in your config.json file for PteroSync:

  • enable_whmcs_user_sync: This should be set to true to enable automatic user synchronization between WHMCS and Pterodactyl. This setting ensures that user information is kept consistent across both platforms.

  • enable_client_area_password_changer: It is recommended to set this to false. This setting disables the password change option in the client area of PteroSync, directing users to manage their password through WHMCS instead. This helps maintain security and consistency for user credentials.

Modifying Pterodactyl's AccountController.php

For a seamless integration and to prevent users from bypassing the WHMCS platform for updates, modifications to the AccountController.php within Pterodactyl are required. Specifically, you'll need to adjust the updateEmail and updatePassword methods.

Locate these methods within: app/Http/Controllers/Api/Client/AccountController.php For both methods, add the following return statement at the top of the function:

For both methods, add the following return statement at the top of the function:

return response()->json([
    'message' => 'This operation is managed through WHMCS. Please update your information there.',
], 403);

Example: Example