projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
306f474
)
self-service delete_contact, RT#37375
author
Ivan Kohler
<ivan@freeside.biz>
Tue, 21 Jul 2015 18:05:32 +0000
(11:05 -0700)
committer
Ivan Kohler
<ivan@freeside.biz>
Tue, 21 Jul 2015 18:05:32 +0000
(11:05 -0700)
FS/FS/ClientAPI/MyAccount/contact.pm
patch
|
blob
|
history
diff --git
a/FS/FS/ClientAPI/MyAccount/contact.pm
b/FS/FS/ClientAPI/MyAccount/contact.pm
index
34a47cc
..
bb86ae0
100644
(file)
--- a/
FS/FS/ClientAPI/MyAccount/contact.pm
+++ b/
FS/FS/ClientAPI/MyAccount/contact.pm
@@
-118,6
+118,9
@@
sub delete_contact {
my($context, $session, $custnum) = _custoragent_session_custnum($p);
return { 'error' => $session } if $context eq 'error';
+ return { 'error' => 'Cannot delete the currently-logged in contact.' }
+ if $p->{contactnum} == $session->{contactnum};
+
my $contact = qsearchs('contact', { contactnum =>$ p->{contactnum},
custnum => $custnum, } )
or return { 'error' => 'Unknown contactnum' };