diff options
author | Ivan Kohler <ivan@freeside.biz> | 2015-07-21 11:05:32 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2015-07-21 11:05:32 -0700 |
commit | b2672342895ae99148fe2c52868e7c2d1b942452 (patch) | |
tree | 502bc1abfd3b5b825617b4241c91c5c204ad2a76 | |
parent | 306f474a1f0b682d4815a8f9bd1a000fd4654253 (diff) |
self-service delete_contact, RT#37375
-rw-r--r-- | FS/FS/ClientAPI/MyAccount/contact.pm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/FS/FS/ClientAPI/MyAccount/contact.pm b/FS/FS/ClientAPI/MyAccount/contact.pm index 34a47cc66..bb86ae02f 100644 --- 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' }; |