Is it possible to change the valid duration time of the one time login link that is send out by mail to the new user? I think by default it is 24 hours, ist it possible to change this to 72 hours?

  • 3
    in your settings.php try adding this $conf['user_password_reset_timeout'] = '259200';
    – arpitr
    Commented Sep 24, 2013 at 18:56
  • 1
    @arpitr You'd better write this as an answer so that you get the points.
    – Elin Y.
    Commented Sep 24, 2013 at 19:49
  • added as answer also :)
    – arpitr
    Commented Sep 24, 2013 at 20:00

4 Answers 4


For Drupal 7: In your settings.php try adding this:

$conf['user_password_reset_timeout'] = '259200';


In Drupal 8, you need to add the following line to your settings.php file:

$config['user.settings']['password_reset_timeout'] = 259200;

See the documentation for Global overrides:

Drupal 8 retains the possibility of using the global $config overrides. The configuration system integrates these override values via the Drupal\Core\Config\ConfigFactory::get() implementation. When you retrieve a value from configuration, the global $config variable gets a chance to change the returned value.


One can do the same in Drupal 8 via Drush too.

  • To get the current setting by default it is 86400 sec means 1 day

    drush config:get user.settings password_reset_timeout
  • To change the reset timeout duration for 2 weeks

    drush config:set user.settings password_reset_timeout 1209600 

Use User Password Reset Link Timeout module.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.