projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4b42b43
)
Make a config for the number of hours a self-service password reset is valid
author
Ivan Kohler
<ivan@freeside.biz>
Wed, 7 Dec 2016 00:15:27 +0000
(16:15 -0800)
committer
Ivan Kohler
<ivan@freeside.biz>
Wed, 7 Dec 2016 00:15:27 +0000
(16:15 -0800)
FS/FS/Conf.pm
patch
|
blob
|
history
FS/FS/contact.pm
patch
|
blob
|
history
diff --git
a/FS/FS/Conf.pm
b/FS/FS/Conf.pm
index
1b6deec
..
d5384e1
100644
(file)
--- a/
FS/FS/Conf.pm
+++ b/
FS/FS/Conf.pm
@@
-2885,6
+2885,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',
diff --git
a/FS/FS/contact.pm
b/FS/FS/contact.pm
index
fd3e9d7
..
1c456e7
100644
(file)
--- 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 {