Skip to content
Last updated

Development Guides Home >> Guide to Standardized Hooks >> Hookable Events

Guide to Standardized Hooks - ConvertAddon Functions

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.

Information

  • Action code runs as: root
  • Blocking attribute: Unavailable.
  • Escalate privileges attribute: N/A

Available stages

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

pre returns

ReturnTypeDescriptionPossible valuesExample
usernamestringThe cPanel username for the new account.A valid cPanel username.newuser1
domainstringThe 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-accountsBooleanWhether to copy WebDisk account data.
  • 1 — Enabled.
  • 0 — Disabled.
1
    custom-vhost-includesBooleanWhether to copy custom VirtualHost includes.
  • 1 — Enabled.
  • 0 — Disabled.
1
    daemonizeBooleanWhether to run the process as a daemon.
  • 1 — Enabled.
  • 0 — Disabled.
1
    docrootBooleanWhether to copy the contents of the addon domain's document root directory.
  • 1 — Enabled.
  • 0 — Disabled.
1
    move-mysqldbBooleanWhether to move MySQL® databases.
  • 1 — Enabled.
  • 0 — Disabled.
1
    autorespondersBooleanWhether to copy email autoresponders.
  • 1 — Enabled.
  • 0 — Disabled.
1
    preserve-ownershipBooleanWhether to preserve ownership of the addon domain.
  • 1 — Enabled.
  • 0 — Disabled.
1
    notify-userstringThe 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-mysqldbBooleanWhether to copy MySQL databases.
  • 1 — Enabled.
  • 0 — Disabled.
1
    move-mysqluserBooleanWhether to move MySQL users.
  • 1 — Enabled.
  • 0 — Disabled.
1
    webmail-dataBooleanWhether to copy Webmail data.
  • 1 — Enabled.
  • 0 — Disabled.
1
    pkgnamestringThe name of the selected package.A valid package name.Default
    email-accountsBooleanWhether to copy the addon domain's email accounts.
  • 1 — Enabled.
  • 0 — Disabled.
1
    email-forwardersBooleanWhether to copy the addon domain's email forwarders.
  • 1 — Enabled.
  • 0 — Disabled.
1
    custom-dns-recordsBooleanWhether to copy the addon domain's custom DNS records.
  • 1 — Enabled.
  • 0 — Disabled.
1
    ftp-accountsBooleanWhether to copy the addon domain's FTP accounts.
  • 1 — Enabled.
  • 0 — Disabled.
1
    copy-installed-ssl-certBooleanWhether to copy the addon domain's installed SSL certificate.
  • 1 — Enabled.
  • 0 — Disabled.
1
    remove-subdomainBooleanWhether to remove the addon domain after conversion.
  • 1 — Enabled.
  • 0 — Disabled.
1
    email-addresssringThe new account's contact email address.A valid email address.user1@example.net

post returns

ReturnTypeDescriptionPossible valuesExample
usernamestringThe new cPanel account's username.A valid cPanel account.newuser1
domainstringThe addon domain that converted into a new account.A valid addon domain name.olddomain.com
statusBooleanWhether the conversion succeeded.
  • 1 — Success.
  • 0 — Failure.
1