summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2015-07-21 11:05:17 -0700
committerIvan Kohler <ivan@freeside.biz>2015-07-21 11:05:17 -0700
commitd83a8bf58a425da397472cc0549f98d906365dba (patch)
treeeb9e548287e9a5be83f718059ed3a844b44509be /FS
parent7efd35e863da5de4bbfcad24ad73da7ec7385f62 (diff)
self-service delete_contact, RT#37375
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/ClientAPI/MyAccount/contact.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/FS/FS/ClientAPI/MyAccount/contact.pm b/FS/FS/ClientAPI/MyAccount/contact.pm
index 72226e2dc..099da29e0 100644
--- a/FS/FS/ClientAPI/MyAccount/contact.pm
+++ b/FS/FS/ClientAPI/MyAccount/contact.pm
@@ -129,6 +129,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 $cust_contact = qsearchs('cust_contact', { contactnum => $p->{contactnum},
custnum => $custnum, })
or return { 'error' => 'Unknown contactnum' };