Signals from UserRepository
The lback.repositories.user_repository.UserRepository handles all direct database interactions for User entities. This repository is designed to emit signals at crucial points in the user lifecycle (create, update, delete). These signals are invaluable for various purposes, including:
Auditing: Tracking changes to user accounts for security and compliance.
Notifications: Triggering emails (e.g., welcome emails, account updates) or other alerts.
Integrations: Synchronizing user data with external systems.
Custom Logic: Implementing bespoke actions before or after user data modifications.
Signal Name |
Description |
Arguments (kwargs) |
|---|---|---|
|
Emitted just before a new User instance is created and added to the database session. This allows for validation or modification of data before persistence. |
|
|
Emitted immediately after a new User instance has been successfully created and added to the database session (but not yet committed). Useful for post-creation actions like sending welcome emails. |
|
|
Emitted just before an existing User instance is updated with new data in the database session. This is ideal for pre-update validation or preparing audit trails. |
|
|
Emitted immediately after an existing User instance has been successfully updated in the database session (but not yet committed). Useful for post-update notifications or cache invalidation. |
|
|
Emitted just before a User instance is marked for deletion in the database session. This can be used for final checks or archiving data. |
|
|
Emitted immediately after a User instance has been successfully marked for deletion in the database session (but not yet committed). Useful for cleanup tasks or confirming deletion in external systems. |
|