User password reset - redirect one time login to another page 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-&gt;uid]) &amp;&amp; isset($_GET['pass-reset-token']) &amp;&amp; ($_GET['pass-reset-token'] == $_SESSION['pass_reset_' . $account-&gt;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?
Use hook_form_alter, then add a  $form['#redirect'] parameter with value as your custom user profile page.

OR
 append a destination query to the default form action url.

&lt;default_action_url&gt;?destination=&lt;your_custom_user_profile_url&gt;


I recommend the first option. It's the Drupal way.