By default, if user submit his email in form at
/user/password page, he will recieve an email with one-time login link. After opening this link he is redirected to page with form with one single "login" button - id of this form is
user_pass_reset. After click on this button user is redirected to his profile in administrative part of a site:
/user/X/edit where he can change his password.
But I have my own custom profile page, where users can change their password and I'd like to redirect user here instead of default profile in administration interface. I already found that
user module is checking if old password is needed with this line:
$pass_reset = isset($_SESSION['pass_reset_' . $account->uid]) && isset($_GET['pass-reset-token']) && ($_GET['pass-reset-token'] == $_SESSION['pass_reset_' . $account->uid]);
But I can't find out how to redirect user to my own form on
user_pass_reset submit. If I alter this form and change
'#action' paramter I get a message that says this one-time login link is invalid. If I add my own submit function
$form['#submit'] = 'activit_password_redirect'; and in this function I call
drupal_goto('my/own/form/page') user is still redirected to default profile page.
Is it possible to change url of this form submit?