summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2016-12-06 16:15:27 -0800
committerIvan Kohler <ivan@freeside.biz>2016-12-06 16:15:27 -0800
commit606df68b2e1c2ee977aba90f3d738237dc23a61c (patch)
tree7b95fa506dfcb3885430b65f488f60984ac5e6e3
parent4b42b437333dfcee25fa00bbb92dccddaa4baff3 (diff)
Make a config for the number of hours a self-service password reset is valid
-rw-r--r--FS/FS/Conf.pm7
-rw-r--r--FS/FS/contact.pm5
2 files changed, 11 insertions, 1 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 1b6deec..d5384e1 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -2886,6 +2886,13 @@ and customer address. Include units.',
},
{
+ 'key' => 'selfservice-password_reset_hours',
+ 'section' => 'self-service',
+ 'description' => 'Numbers of hours an email password reset is valid. Defaults to 24.',
+ 'type' => 'text',
+ },
+
+ {
'key' => 'selfservice-password_reset_msgnum',
'section' => 'self-service',
'description' => 'Template to use for password reset emails.',
diff --git a/FS/FS/contact.pm b/FS/FS/contact.pm
index fd3e9d7..1c456e7 100644
--- a/FS/FS/contact.pm
+++ b/FS/FS/contact.pm
@@ -867,7 +867,10 @@ sub send_reset_email {
'svcnum' => $opt{'svcnum'},
};
- my $timeout = '24 hours'; #?
+
+ my $conf = new FS::Conf;
+ my $timeout =
+ ($conf->config('selfservice-password_reset_hours') || 24 ). ' hours';
my $reset_session_id;
do {