Child pages
  • Guide to Standardized Hooks - ConvertAddon Functions
Skip to end of metadata
Go to start of metadata

 

Introduction

The ConvertAddon category's events occur during WHM functions.

ConvertAddon::convert_addon


This event triggers whenever a user converts an addon domain into an account.

Available Stages:

  • pre — Hook action code runs before the change.
  • post — Hook actions code runs after the change.

Action Code Runs As:

root

Blocking Attribute:

Escalate Privileges Attribute:

N/A

Output parameters

Note:

The chosen stage determines the event's output. Select the appropriate tab to view output parameters for that stage. 

ParameterTypeDescriptionPossible valuesExample
usernamestring

The cPanel username for the new account.

A valid cPanel username.newuser1
domainstring

The addon domain to convert into a new account.

A valid addon domain name.

olddomain.com
conversion optionshashThe options that you selected for the conversion.  

webdisk-accounts

BooleanWhether to copy WebDisk account data.
  • 1 — Enabled.
  • 0 — Disabled.
1

custom-vhost-includes

BooleanWhether to copy custom VirtualHost includes.
  • 1 — Enabled.
  • 0 — Disabled.
1

daemonize

BooleanWhether to run the process as a daemon.
  • 1 — Enabled.
  • 0 — Disabled.
1

docroot

BooleanWhether to copy the contents of the addon domain's document root directory.
  • 1 — Enabled.
  • 0 — Disabled.
1

move-mysqldb

BooleanWhether to move MySQL® databases.
  • 1 — Enabled.
  • 0 — Disabled.
1

autoresponders

BooleanWhether to copy email autoresponders.
  • 1 — Enabled.
  • 0 — Disabled.
1

preserve-ownership

BooleanWhether to preserve ownership of the addon domain.
  • 1 — Enabled.
  • 0 — Disabled.
1

notify-user

stringThe account to notify of changes to the addon domain. Usually, specify the user account that performs the conversion.

A valid cPanel user account.

root

copy-mysqldb

BooleanWhether to copy MySQL databases.
  • 1 — Enabled.
  • 0 — Disabled.
0

move-mysqluser

BooleanWhether to move MySQL users.
  • 1 — Enabled.
  • 0 — Disabled.
1

webmail-data

BooleanWhether to copy Webmail data.
  • 1 — Enabled.
  • 0 — Disabled.
1

pkgname

stringThe name of the selected package.

A valid package name.

Default

email-accounts

BooleanWhether to copy the addon domain's email accounts.
  • 1 — Enabled.
  • 0 — Disabled.
1

email-forwarders

BooleanWhether to copy the addon domain's email forwarders.
  • 1 — Enabled.
  • 0 — Disabled.
1

custom-dns-records

BooleanWhether to copy the addon domain's custom DNS records.
  • 1 — Enabled.
  • 0 — Disabled.
1

ftp-accounts

BooleanWhether to copy the addon domain's FTP accounts.
  • 1 — Enabled.
  • 0 — Disabled.
1

copy-installed-ssl-cert

BooleanWhether to copy the addon domain's installed SSL certificate.
  • 1 — Enabled.
  • 0 — Disabled.
1

remove-subdomain

BooleanWhether to remove the addon domain after conversion.
  • 1 — Enabled.
  • 0 — Disabled.
1

email-address

stringThe new account's contact email address.

A valid email address.

user1@example.net
ParameterTypeDescriptionPossible valuesExample
usernamestring

The new cPanel account's username.

A valid cPanel account.newuser1
domainstring

The addon domain that converted into a new account.

A valid addon domain name.

olddomain.com
statusBooleanWhether the conversion succeeded.
  • 1 — Success.
  • 0 — Failure.
1