[freeside-commits] branch FREESIDE_3_BRANCH updated. 25b1fc860d3e6f78df66638e7a26079c2498d8a6
Ivan
ivan at 420.am
Mon Dec 30 15:52:10 PST 2013
The branch, FREESIDE_3_BRANCH has been updated
via 25b1fc860d3e6f78df66638e7a26079c2498d8a6 (commit)
from 7785677b084c8d3d5b0aa61d1dff965ac28e2746 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 25b1fc860d3e6f78df66638e7a26079c2498d8a6
Author: Ivan Kohler <ivan at freeside.biz>
Date: Mon Dec 30 15:52:09 2013 -0800
self-service access for contacts, RT#25533
diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm
index 8a0bbd4..54d5306 100644
--- a/FS/FS/ClientAPI/MyAccount.pm
+++ b/FS/FS/ClientAPI/MyAccount.pm
@@ -2854,6 +2854,16 @@ sub myaccount_passwd {
$svc_acct->set_password($p->{'new_password'});
$error ||= $svc_acct->replace();
+ #regular pw change in self-service should change contact pw too, otherwise its
+ #way too confusing. hell its confusing they're separate at all, but alas.
+ #need to support the "ISP provides email that's used as a contact email" case
+ #as well as we can.
+ my $contact = FS::contact->by_selfservice_email($svc_acct->email);
+ if ( $contact && $contact->custnum == $custnum ) {
+ #svc_acct was successful but this one returns an error? "shouldn't happen"
+ $error ||= $contact->change_password($p->{'new_password'});
+ }
+
my($label, $value) = $svc_acct->cust_svc->label;
return { 'error' => $error,
@@ -2863,7 +2873,6 @@ sub myaccount_passwd {
}
-#regular pw change in self-service should change contact pw too, otherwise its way too confusing. hell its confusing they're separate at all, but alas. need to support the "ISP provides email that's used as a contact email" case as well as we can.
# sub contact_passwd {
# my $p = shift;
# my($context, $session, $custnum) = _custoragent_session_custnum($p);
diff --git a/fs_selfservice/FS-SelfService/cgi/forgot_password.html b/fs_selfservice/FS-SelfService/cgi/forgot_password.html
index 6071511..a1ce851 100644
--- a/fs_selfservice/FS-SelfService/cgi/forgot_password.html
+++ b/fs_selfservice/FS-SelfService/cgi/forgot_password.html
@@ -14,7 +14,7 @@
<INPUT TYPE="hidden" NAME="action" VALUE="do_forgot_password">
<INPUT TYPE="hidden" NAME="agentnum" VALUE="<%= $agentnum %>">
-Please enter your email address. A password reset email will be sent to that address.
+Please enter your email address. A password reset email will be sent to that address.<BR><BR>
<TABLE BGCOLOR="<%= $box_bgcolor || '#c0c0c0' %>" BORDER=0 CELLSPACING=2 CELLPADDING=0>
diff --git a/fs_selfservice/FS-SelfService/cgi/login.html b/fs_selfservice/FS-SelfService/cgi/login.html
index f7af4e9..9cee01d 100644
--- a/fs_selfservice/FS-SelfService/cgi/login.html
+++ b/fs_selfservice/FS-SelfService/cgi/login.html
@@ -47,7 +47,7 @@ if ( $single_domain ) {
<TR>
<TH ALIGN="right">Password </TH>
<TD>
- <INPUT TYPE="password" NAME="password">
+ <INPUT TYPE="password" NAME="password"> <A HREF="<%= $selfurl %>?action=forgot_password">Forgot your password?</A>
</TD>
</TR>
<TR>
-----------------------------------------------------------------------
Summary of changes:
FS/FS/ClientAPI/MyAccount.pm | 11 ++++++++++-
.../FS-SelfService/cgi/forgot_password.html | 2 +-
fs_selfservice/FS-SelfService/cgi/login.html | 2 +-
3 files changed, 12 insertions(+), 3 deletions(-)
More information about the freeside-commits
mailing list