Jump to content

More information about ClientAdd Hook?


dottedquad

Recommended Posts

I would like to create a hook. The hook will be responsible for creating the same user that was just recently added to whmcs to another script. I followed this guide: http://developers.whmcs.com/hooks/sample-hook/ which seems rather straight forward. However, the Sample Hook is lacking more information. I would like to know all of the available $vars. I had a look in the Hook Index section of Hooks and did not find "ClientAdd"

 

I require all of the fields:

Register.png

Link to comment
Share on other sites

with regards to ClientAdd, I haven't checked to see whether it's still available for v7 - but it's v6 documentation stated...

 

Client Add

 

Hook Type

 

Standard

When Run

 

This hook is run when adding a new client. It doesn't matter how the client is added - can be via the admin area, client side signup or API - the hook will always be called.

Variables

 

[TABLE=class: wikitable, width: 100%]

[TR]

[TH=align: center] Variable[/TH]

[TH=align: center] Type[/TH]

[TH=align: center] Notes[/TH]

[/TR]

[TR]

[TD]userid[/TD]

[TD]Integer[/TD]

[TD]The id from tblclients for the user that has been added.[/TD]

[/TR]

[TR]

[TD]firstname[/TD]

[TD]String[/TD]

[TD] The client's firstname[/TD]

[/TR]

[TR]

[TD]lastname[/TD]

[TD]String[/TD]

[TD] The client's lastname[/TD]

[/TR]

[TR]

[TD]companyname[/TD]

[TD]String[/TD]

[TD] The client's company, if entered[/TD]

[/TR]

[TR]

[TD]email[/TD]

[TD]Email[/TD]

[TD] The client's email[/TD]

[/TR]

[TR]

[TD]address1[/TD]

[TD]String[/TD]

[TD] The client's address1[/TD]

[/TR]

[TR]

[TD]address2[/TD]

[TD]String[/TD]

[TD] The client's address2, if entered[/TD]

[/TR]

[TR]

[TD]city[/TD]

[TD]String[/TD]

[TD] The client's city[/TD]

[/TR]

[TR]

[TD]state[/TD]

[TD]String[/TD]

[TD] The client's state[/TD]

[/TR]

[TR]

[TD]postcode[/TD]

[TD]String[/TD]

[TD] The client's postcode/zipcode[/TD]

[/TR]

[TR]

[TD]country[/TD]

[TD]String[/TD]

[TD] The client's country (2 character code)[/TD]

[/TR]

[TR]

[TD]phonenumber[/TD]

[TD]Telephone Number[/TD]

[TD] The client's phone number[/TD]

[/TR]

[TR]

[TD]password[/TD]

[TD]String[/TD]

[TD] The client password.[/TD]

[/TR]

[TR]

[TD]customfields[/TD]

[TD]Array[/TD]

[TD] A base64 encoded serialized array of custom field values[/TD]

[/TR]

[/TABLE]

Expected Return

 

None

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated