Log activity when modifying account details

This commit is contained in:
DaneEveritt 2022-05-29 18:48:35 -04:00
parent 0b2c0db170
commit 287fd60891
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
15 changed files with 85 additions and 57 deletions

View file

@ -29,7 +29,7 @@ class AuthenticationListener implements SubscribesToEvents
}
}
$activity->event($event instanceof Failed ? 'login.failed' : 'login.success')->log();
$activity->event($event instanceof Failed ? 'auth:fail' : 'auth:success')->log();
}
public function subscribe(Dispatcher $events): void

View file

@ -17,7 +17,7 @@ class PasswordResetListener
public function handle(PasswordReset $event)
{
Activity::event('login.password-reset')
Activity::event('event:password-reset')
->withRequestMetadata()
->subject($event->user)
->log();

View file

@ -9,7 +9,7 @@ class TwoFactorListener
{
public function handle(ProvidedAuthenticationToken $event)
{
Activity::event($event->recovery ? 'login.recovery-token' : 'login.token')
Activity::event($event->recovery ? 'auth:recovery-token' : 'auth:token')
->withRequestMetadata()
->subject($event->user)
->log();