Hi!
I have 3 different kinds of users. I would like to redirect each group to a initial application when they log in. For instance, user John from group 3 redirects to application ‘grid_3’, user May from group 2, redirects to application ‘grid_2’.
I’ve tried this code in event “OnValidateSuccess” in ‘app_login’ application:
/**
 * Conditional redirection
 */
// Redirection parameters
$redir_app  = 'grid_2'; // Application name
$redir_test  = {group} == '2'; // Redirection test
$redir_target = '_blank'; // Target window (_blank, _self, _parent or modal)
$redir_param = array(   // Param list, add as many as needed
					'param_1' => 'value_1',
					'param_2' => 'value_2',
);
// Redirection
if ($redir_test)
{
  sc_redir($redir_app, $redir_param, $redir_target);
}
In my database I have users and groups, so I am calling the field ‘group’ (I mean, it exists). But this code doesn’t work for me. I suppose I have to enter more values in ‘param_1’ and ‘param_2’ but I don’t know how to keep on. Could you help me?
Thanks.
Emma