Jump to content
dottedquad

More information about ClientAdd Hook?

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

ClientAdd stopped working for me on last update to Version: 7.1.2

 

Has anything been added that we can use to achieve same result, add a hook on completion of adding a new client?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

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