Redirect after password reset

bob_hirnlego - February 11, 2009 - 10:52
Project:Legal
Version:6.x-2.2-beta4
Component:Miscellaneous
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Normally - after resetting password - the user is redirected to user/uid/edit to let him change the password.
With legal installed, if user must agree to new conditions, the redirection goes to user/uid instead, breaking the password reset process.
This also contraddicts the statement contained in the mail sent to the user.

#1

hefox - May 1, 2009 - 20:48

I needed to solve this also.
Changed around line 444 to:

<?php
       
if (arg(1)=='reset') $add = '/reset';
       
drupal_goto('legal_accept/' . $signatory->uid . '/' . md5($signatory->name . $signatory->password . $signatory->login).$add);
?>

Changed the end of function legal_login_submit to :
uid . ($reset?'/edit':'');
return;
?>

#2

hefox - May 1, 2009 - 21:19

oops

<?php
    $reset
=  (arg(3)=='reset') ;
    if (
$reset) drupal_set_message('You have just used your one-time login link. It is no longer necessary to use this link to login. Please change your password.');
       
$form_state['redirect'] = 'user/'. $user->uid . ($reset?'/edit':'');
    return;
?>

 
 

Drupal is a registered trademark of Dries Buytaert.