Hi,
If I have some logs and a user gets deleted. I then have no way of getting the causer email because the causer no longer exists. Is there a way of handling this?
You could log a new activity with a description that contains the
emailaddress right before deleting the user (or use a custom property)
Another route would be to use soft deletes on your user model.
On Friday, 14 October 2016, Chris [email protected] wrote:
Hi,
If I have some logs and a user gets deleted. I then have no way of getting
the causer email because the causer no longer exists. Is there a way of
handling this?—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/spatie/laravel-activitylog/issues/94, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AAdiDerysAO5Zxhy7XChRUmYYaI5_OOYks5qz-mBgaJpZM4KXbBG
.
Freek Van der Herten
https://spatie.be
+32 495 84 27 91
How would I go about including softDeleted users in the causer method?
[needs official approval]
Just make another Model wich extends Spatie\Activitylog\Models\Activity !!
and edit the causer method just like the subject method

and in the file
config/activitylog.php set the new Model as the current Activity model

@fr4j4 one thing you miss.

It's working fine. Thanks to @fr4j4