Redirecting after login for specific roles I want to redirect specific users after a succesful login but I can't make it work. 
Here's my code:

function concessionaire_login_user_login(&amp;$edit, $account) {
foreach ($account-&gt;roles as $role){
    if($role == "administrator"){   
    } else if ($role=="concessionnaire"){
        global $language;
        unset($_REQUEST['destination']);
        unset($_REQUEST['edit']['destination']);
        $url = "http://www.my-site.com/myfile.php";
        $options = array(
        'query' =&gt; 'id_rub=14&amp;lg='.$language-&gt;language
        );
        drupal_goto($url,$options)

    }
}


}

I tried also with header('location: $url'), but it doesn't work either. Login_destination module was my first guess but I can't use variables..

Also is it possible to redirect to an external URL and passing POST parameters at the same time ?

Thanks in advance.
Some things to look at:

'query' itself needs to be an array, not a string, eg...

array('id_rub' =&gt; '14', 'lg' =&gt; $language-&gt;language)  


and if you want to call header() directly, you need some more parameters:

header('Location: ' . $url, TRUE, $http_response_code);
drupal_exit($url);


(and an exit for good measure...btw, that's all drupal_goto() is really doing anyway)