SuiteCRM Logic Hooks to disable Portal User after deleting related Contact


I was looking for a way to automatically disable a Portal User when the related Contact is deleted from the crm.

I don’t know how to implement this but it would be nice if there is some kind of logic hook that I could use in this case.

I found this:
but I’m not really sure if this specific documentation applies to Sugar CE and SuiteCRM.

Any help about the specific problem (disable portal user after contact deletion) or generally about logic hooks would be greatly appreciated.


Hi George,

Sorry for the delay in replying.

The link you posted also applies to SuiteCRM. In order to do what you need you could create an after_delete logic hook.

In the logic hook you could then make a call to disable the portal user. To disable you could either make a call to:

or you could check the code that the above runs (found in custom/modules/Contacts/disablePortalUser.php) and use that in the logic hook.

Hope this helps,

1 Like