Skip to content

AccountEvent class

namespace: Serenity.Extensions   assembly: Serenity.Extensions

Something that happened to an account, e.g. its password was changed, which IAccountEventPublisher tells the IAccountEventHandlers of, e.g. one that emails the user. The publisher fills what the code that raises it leaves out: the user from UserId, who did it, when, and from where.

public class AccountEvent

Public Members

name description
AccountEvent() The default constructor.
ActorDisplayName { get; set; } The display name of the user who did it.
ActorUserId { get; set; } The ID of the user who did it, which is not set when no one was signed in, e.g. for a reset link.
ActorUsername { get; set; } The username of the user who did it.
DisplayName { get; set; } The display name of the user.
Email { get; set; } The email address of the user.
IPAddress { get; set; } The IP address of the request.
IsSelf { get; } Whether the user did it, or no one who was signed in, e.g. with a reset link that was emailed to the user.
Kind { get; set; } What happened.
Method { get; set; } The key of the two-factor authentication method, e.g. "Email", for the two-factor events, or how the user signed in, e.g. "Password" or "Google", for the sign-in events.
NewValue { get; set; } The value after, e.g. the new email address of EmailChanged.
OldValue { get; set; } The value before, e.g. the old email address of EmailChanged.
Reason { get; set; } Why it failed, e.g. "InvalidPassword" of SignInFailureReasons, for the failed events.
Time { get; set; } When it happened, in UTC.
UserAgent { get; set; } The user agent of the request, e.g. the browser.
UserId { get; set; } The ID of the user whose account it is.
Username { get; set; } The username of the user.

See Also