You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How to create a custom hook.?

Accepted answer
55
Views
1
Comments
edited Jan 15, 2019 10:36AM in Customer Portal 1 comment

Content

Hi all,

CP framework gives us some built-in hooks, like "pre_login, post_contact_create etc". there are almost 10 to 12 hooks are given in hook.php file. I want to create my own custom hook. like "when_specific_error_occurrs" then this will redirect me to hook.php in my "when_specific_error_occurrs" hooks where I give it the 3 items(class, function, and filepath). Is that any way to do this.?

my problem is. when the external site gives me some user data to log-in the and that contact is created in OSvC already then "pre_login" hook runs, and the customer is logged-in. but when my external site hit the users data to log-in in CP, and that contact does not exist in OSvC it will not hit the "pre_login" hook. And I want to create a new contact when a specific user does not exist. I'm using SSO, so the PTA configuration is not creating auto_contact_create 

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!