[users-module] - UserWasDeleted Event is fired in both Delete and Trash

lckamal - 2 months ago

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?

Answer

piterden - 2 months ago

Any EloquentModel has the isForceDeleting() method...

ryanthompson - 2 months ago

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

piterden - 2 months ago

Any EloquentModel has the isForceDeleting() method...