summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2016-12-06 16:14:03 -0800
committerIvan Kohler <ivan@freeside.biz>2016-12-06 16:14:03 -0800
commit3c76cd28ea10efe044bdfcd2b6f5cb7e6c533416 (patch)
tree71aef64fd3b7f9cabbe79322ce09cb1df8704e69
parenta43fb5bc593ac742a3154edac76858142e4be6ab (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 4c87f9396..90d074710 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -2909,6 +2909,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 a8aa43b39..2dbe54833 100644
--- a/FS/FS/contact.pm
+++ b/FS/FS/contact.pm
@@ -873,7 +873,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 {