10

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

3 Answers 3

12

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

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

3

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.

0

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 
    

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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