Table of Contents

Class Standard.User.OnExtranetLoginArgs

Namespace
Dynamicweb.Notifications
Assembly
Dynamicweb.dll

Provides information about the user

public class Standard.User.OnExtranetLoginArgs : NotificationArgs
Inheritance
Standard.User.OnExtranetLoginArgs
Inherited Members

Examples

namespace Dynamicweb.Examples.Notifications.Standard;

[Dynamicweb.Extensibility.Notifications.Subscribe(Dynamicweb.Notifications.Standard.User.OnExtranetLogin)]
public class OnExtranetLogOnObserver : Dynamicweb.Extensibility.Notifications.NotificationSubscriber
{
    public override void OnNotify(string notification, Dynamicweb.Extensibility.Notifications.NotificationArgs args)
    {
        if (args == null)
            return;

        if (!(args is Dynamicweb.Notifications.Standard.User.OnExtranetLoginArgs))
            return;

        Dynamicweb.Notifications.Standard.User.OnExtranetLoginArgs item = (Dynamicweb.Notifications.Standard.User.OnExtranetLoginArgs)args;
        //Pass user name to the notification e-mail
        string emailBody = $"The user ({item.User.Name}) has been logged-in.";

    }
}

Remarks

Properties

User

Gets the user.

public required User User { get; init; }

Property Value

User

The user.

To top