Class UserNotification
Abstract base class for user-related notifications such as login, logout, password changes, and locking.
Inheritance
Namespace: Umbraco.Cms.Core.Notifications
Assembly: Umbraco.Core.dll
Syntax
public abstract class UserNotification : INotification
Remarks
This class provides common properties for tracking the user action, the affected user, and the performing user for audit and security logging purposes.
Constructors
View SourceUserNotification(string, string?, string)
Initializes a new instance of the UserNotification class.
Declaration
protected UserNotification(string ipAddress, string? affectedUserId, string performingUserId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | ipAddress | The source IP address of the user performing the action. |
| string | affectedUserId | The ID of the user affected by this action. |
| string | performingUserId | The ID of the user performing this action. |
Properties
View SourceAffectedUserId
Gets the ID of the user affected by this action.
Declaration
public string? AffectedUserId { get; }
Property Value
| Type | Description |
|---|---|
| string |
DateTimeUtc
Gets the date and time in UTC when this notification was created.
Declaration
public DateTime DateTimeUtc { get; }
Property Value
| Type | Description |
|---|---|
| DateTime |
IpAddress
Gets the source IP address of the user performing the action.
Declaration
public string IpAddress { get; }
Property Value
| Type | Description |
|---|---|
| string |
PerformingUserId
Gets the ID of the user performing this action.
Declaration
public string PerformingUserId { get; }
Property Value
| Type | Description |
|---|---|
| string |
Remarks
If a user is performing an action on a different user, this will differ from AffectedUserId.