Jump to content

ClientDetailsValidation Hook Bug


Burti

Recommended Posts

Hello,

 

I was able to access both of those variables in the hook I placed in /includes/hooks/example.php:

 

function create_forum_account($vars) {

   $firstname = $vars['firstname'];
   $lastname = $vars['lastname'];
   $email = $vars['email'];

   // Run code to create remote forum account here...

   logActivity("$firstname - $lastname - $email");
}

add_hook("ClientDetailsValidation",1,"create_forum_account");

 

04/09/2014 16:34

Client Profile Modified - First Name: 'Test' to 'Testing' - User ID: 1

admin 10.1.18.34

04/09/2014 16:34

Hooks Debug: Hook Completed - Returned False

admin 10.1.18.34

04/09/2014 16:34

Testing - Client - user@testing.qa.whmcs.com

admin 10.1.18.34

04/09/2014 16:34

Hooks Debug: Hook Point ClientDetailsValidation - Calling Hook Function create_forum_account

admin 10.1.18.34

 

If it is not working on your system, please open a support ticket so we can investigate your system further.

 

Nate

Link to comment
Share on other sites

Hello,

 

I was able to access both of those variables in the hook I placed in /includes/hooks/example.php:

 

function create_forum_account($vars) {

   $firstname = $vars['firstname'];
   $lastname = $vars['lastname'];
   $email = $vars['email'];

   // Run code to create remote forum account here...

   logActivity("$firstname - $lastname - $email");
}

add_hook("ClientDetailsValidation",1,"create_forum_account");

 

04/09/2014 16:34

Client Profile Modified - First Name: 'Test' to 'Testing' - User ID: 1

admin 10.1.18.34

04/09/2014 16:34

Hooks Debug: Hook Completed - Returned False

admin 10.1.18.34

04/09/2014 16:34

Testing - Client - user@testing.qa.whmcs.com

admin 10.1.18.34

04/09/2014 16:34

Hooks Debug: Hook Point ClientDetailsValidation - Calling Hook Function create_forum_account

admin 10.1.18.34

 

If it is not working on your system, please open a support ticket so we can investigate your system further.

 

Nate

 

Thanks Nate but try again please:

 

 

 

First please do it:

Setup > General Settings > Other > Locked Client Profile Fields > First Name->Checked , Last Name->Checked

 

and try again I try :

 

 

function tckncheck($vars){
var_dump($vars);
}
add_hook("ClientDetailsValidation", 1,"tckncheck");

 

Out:

array(14) {
 ["token"]=>
 string(40) "cff470d195ff700502ab9f5da2c1c300e5cf8bfe"
 ["companyname"]=>
 string( "BurtiNET"
 ["email"]=>
 string(23) "0000@0000.com"
 ["paymentmethod"]=>
 string(4) "none"
 ["billingcid"]=>
 string(1) "0"
 ["address1"]=>
 string(4) "Test"
 ["address2"]=>
 string(0) ""
 ["city"]=>
 string(0) ""
 ["state"]=>
 string(10) "ATAŞEHİR"
 ["postcode"]=>
 string(5) "00000"
 ["country"]=>
 string(2) "TR"
 ["phonenumber"]=>
 string(12) "00"
 ["customfield"]=>
 array(5) {
   [7]=>
   string(10) "0000000000"
   [8]=>
   string(2) "on"
   [12]=>
   string(11) "00000"
   [13]=>
   string(4) "9999"
   [14]=>
   string(5) "Burti"
 }
 ["save"]=>
 string(12) "Save Changes"
}

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.

×
×
  • 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