dottedquad Posted March 15, 2017 Share Posted March 15, 2017 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: 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 15, 2017 Share Posted March 15, 2017 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 0 Quote Link to comment Share on other sites More sharing options...
dottedquad Posted March 17, 2017 Author Share Posted March 17, 2017 brian!, ClientAdd still works with v7.1.2 thanks again for the help 0 Quote Link to comment Share on other sites More sharing options...
dottedquad Posted March 24, 2017 Author Share Posted March 24, 2017 @brian! Where can I get the documentation to v6? 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted March 24, 2017 Share Posted March 24, 2017 @brian! Where can I get the documentation to v6? there is only one documentation available http://developers.whmcs.com for Developers and this is for clients http://docs.whmcs.com 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted March 24, 2017 Share Posted March 24, 2017 @brian! Where can I get the documentation to v6? if you want to see the old v6 documentation, you'd need to visit archive.org and choose a date in 2015 or 2016... https://web-beta.archive.org/web/*/http://docs.whmcs.com/Main_Page 0 Quote Link to comment Share on other sites More sharing options...
kmm2908 Posted March 30, 2017 Share Posted March 30, 2017 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? 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.