diff options
author | Christopher Burger <burgerc@freeside.biz> | 2018-09-25 13:19:46 -0400 |
---|---|---|
committer | Christopher Burger <burgerc@freeside.biz> | 2018-09-25 13:19:46 -0400 |
commit | 66b90d3d395a6bace7d3d73743fbd3dc54bda8b6 (patch) | |
tree | 777eaa401dffb747cb7736508d74ba6b2273ca14 /httemplate/misc | |
parent | 45c72d122fa15a957d3f8ef79ef3bd06f459f563 (diff) |
RT# 75817 - fixed selecting random password on custmain page
Diffstat (limited to 'httemplate/misc')
-rw-r--r-- | httemplate/misc/process/change-password.html | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/httemplate/misc/process/change-password.html b/httemplate/misc/process/change-password.html index 37ad6d915..1c746a4e0 100644 --- a/httemplate/misc/process/change-password.html +++ b/httemplate/misc/process/change-password.html @@ -18,7 +18,15 @@ <% $cgi->redirect($fsurl.'view/svc_acct.cgi?'.$cgi->query_string) %> % } % elsif ($contactnum) { - <% $cgi->redirect($fsurl.'view/cust_main.cgi?'.$cgi->param('custnum')) %> +% my $freeside_status = "Contact ".$contact->{'Hash'}->{'first'}." ".$contact->{'Hash'}->{'last'}." password updated."; + <% $cgi->redirect( -uri => popurl(3). "view/cust_main.cgi?". $cgi->param('custnum'), + -cookie => CGI::Cookie->new( + -name => 'freeside_status', + -value => mt($freeside_status), + -expires => '+5m', + ), + ) +%> % } % } @@ -30,6 +38,7 @@ <%init> my $curuser = $FS::CurrentUser::CurrentUser; +my $contact; $cgi->param('svcnum') =~ /^(\d+)$/ or die "illegal svcnum" if $cgi->param('svcnum'); my $svcnum = $1; @@ -65,7 +74,7 @@ if ($svcnum) { $cgi->delete('password'); } elsif ($contactnum) { - my $contact = qsearchs('contact', { 'contactnum' => $contactnum } ) + $contact = qsearchs('contact', { 'contactnum' => $contactnum } ) or return { 'error' => "Contact not found" . $contactnum }; $error = $contact->is_password_allowed($newpass) |