Ixonn Group

Redirect Contact to Another Page After Login

You are here:
< All Topics

If you need to redirect contact after login to some custom URL or some other URL inside the CRM you can do it with action hook.

Create a file with name my_functions_helper.php in application/helpers/ and add the following code:

Version 2.3.0 or above

<?php

 

// After contact login from the login form

hooks()->add_action(‘after_contact_login’,’redirect_to_projects’);

// After client registered and logged in automatically

hooks()->add_action(‘after_client_register_logged_in’,’redirect_to_projects’);

 

function redirect_to_projects(){

redirect(site_url(‘clients/projects’));

}

Prior to version 2.3.0

<?php

 

// After contact login from the login form

add_action(‘after_contact_login’,’redirect_to_projects’);

// After client registered and logged in automatically

add_action(‘after_client_register_logged_in’,’redirect_to_projects’);

 

function redirect_to_projects(){

redirect(site_url(‘clients/projects’));

}

This is an example where the contact will be redirected to the projects view inside the CRM, however, you can adjust the URL to fit for your requirements.

Related Articles

Table of Contents
Scroll Up