diff options
Diffstat (limited to 'FS')
-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 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' }; |