I know this is an old post but the answer may help someone. Besides I have gained enough from this forum its nice to give something back.
First modify the Authenticate.php file in the Users module directory of vTiger.
Add to Authenticate.php after $focus->load_user($user_password);
//*************************************************************************
// Modification to allow redirect to module after login
// Adds 3 optional parameters to query string
// forward_action = action to take in module
// forward_module = module we wish to redirect to
// record = the record if any we wish to display in module
// This code came from the SugarCRM forums but it applies to vTiger also
//
http://www.sugarcrm.com/forums/showthread.php?t=4046
//************************************************************************
$forward_action = "index";
$forward_module = "Home";
$record = "";
if (isset($_REQUEST['forward_action']))
{
$forward_action = $_REQUEST['forward_action'];
}
if (isset($_REQUEST['forward_module']))
{
$forward_module = $_REQUEST['forward_module'];
}
if (isset($_REQUEST['record']))
{
$record = $_REQUEST['record'];
}
$login_direction = "action=$forward_action&module=$forward_module&from=login&record=$record";
//*************************************************************************
// End Redirect Mod
//*************************************************************************
Then comment out Line 70: "header("Location: index.php?action=index&module=Home");"
add this line below
header("Location: index.php?$login_direction");
To login and redirect to a module add these query strings to your URL. For example if I wanted to redirect to the Contacts Module and view record 1, I would use the following URL
http://URLTOVTIGER/index.php?action=Aut ... x&record=1
If Using the vTigerSearch script for Vicidial change the line after Amend URL to:
$account_URL = "http://192.168.1.215/crm/index.php?action=Authenticate&module=Users&return_module=Users&return_action=Login&user_name=$user&user_password=$pass&login_language=en_us&forward_module=Leads&forward_action=DetailView&record=$leadid"
This depends on the Vicidial agents having a users account in vTiger with the same usernames and password as Vicidial.