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?
-
3in your settings.php try adding this $conf['user_password_reset_timeout'] = '259200';– arpitrSep 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 :)– arpitrSep 24, 2013 at 20:00
3 Answers
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