Custom login page with redirect I've set up a custom login page witht the difference that that one should redirect the user to another page.

I use the default drupal login form so I dont really now how to fix the form alter for my custom form without it to change the default login form too.

What could I do to fix this?

My code:

function mymodule_cv_login() {
    // Print the user login form
    $form = drupal_get_form('user_login');

    $form['redirect'] = 'cv';

    return $form;
}

function mymodule_form_alter(&amp;$form, &amp;$form_state, $form_id) {
    if ($form_id == 'user_login') {
        $path = 'profil';
        $form['#action'] = url($_GET['q'], array('query' =&gt; array('destination' =&gt; $path)));
    }
}
You can check what page you are on by looking at $_GET['q'] (or using the arg() function) so you could base your alter on that.