Voyti

Voyti

User management, authentication & authorization

Events

Voyti dispatches events at key points in the user lifecycle, allowing your application to react, log, or extend behaviour. Each event carries a const string name to distinguish before/after variants. Attach your own listeners through the Yii3 event dispatcher configuration.

Events with default listeners

Event Trigger Default behavior
AfterLoginEventUser logs inTriggers password expiration check and session tracking
AfterRegisterEventNew user registrationSends admin notification email

Additional events (no default listeners)

Dispatched by the library, but nothing consumes them by default - attach your own listener via the event dispatcher configuration if you need to react to them.

  • UserEvent - Carries a getType() discriminator: UserEvent::CREATE, BLOCK, UNBLOCK, CONFIRM, SWITCH_IDENTITY, RESTORE_IDENTITY, PASSWORD_RESET, or DELETE
  • UserProfileEvent - Dispatched when a user updates their profile
  • GdprEvent - Dispatched after a user's account is anonymized (not on hard delete, which fires UserEvent with type UserEvent::DELETE)
  • ResetPasswordEvent - Password reset flow
  • SessionEvent - Dispatched with type SESSION_CREATED on login, and with type SESSION_TERMINATED whenever a user's sessions are terminated (account deletion, GDPR anonymization, or being blocked). The SESSION_UPDATED type is defined but not currently dispatched.