[users-module] - UserWasDeleted Event is fired in both Delete and Trash
Created 2 years ago by lckamal

I wanted to clear data from my Profiles module if user is force deleted (record is deleted from table) but while using Anomaly\UsersModule\User\Event\UserWasDeleted, This event fires on both case delete/force delete. how to know if user is deleted or force deleted?

piterden  —  2 years ago Best Answer

Any EloquentModel has the isForceDeleting() method...

ryanthompson  —  2 years ago

Hmm interesting, yes. Make an issue for it - seems like it should only fire during delete.. not force delete.

piterden  —  2 years ago Best Answer

Any EloquentModel has the isForceDeleting() method...