如何延长一次性登录链接的持续时间?


9

是否可以更改通过邮件发送给新用户的一次性登录链接的有效持续时间?我认为默认情况下是24小时,是否可以将其更改为72小时?


2
在您的settings.php中,尝试添加此$ conf ['user_password_reset_timeout'] ='259200';
arpitr

1
@arpitr您最好将此作为答案来写,以便获得积分。
ЕлинЙ.

也添加为答案:)
arpitr

Answers:


11

对于Drupal 7:在您的settings.php尝试中添加以下内容:

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


2

在Drupal 8中,您需要将以下行添加到settings.php文件中:

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

请参阅有关全局替代文档

Drupal 8保留了使用全局$ config覆盖的可能性。配置系统通过Drupal \ Core \ Config \ ConfigFactory :: get()实现集成这些替代值。从配置中检索值时,全局$ config变量将有机会更改返回的值。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.