Click or drag to resize

StandardAdminStartArgs Class

Provides information about the Admin default page after the user logged in.
Inheritance Hierarchy
SystemObject
  Dynamicweb.Extensibility.NotificationsNotificationArgs
    Dynamicweb.NotificationsStandardAdminStartArgs

Namespace:  Dynamicweb.Notifications
Assembly:  Dynamicweb (in Dynamicweb.dll) Version: 9.10.0
Syntax
public class StartArgs : NotificationArgs

The StandardAdminStartArgs type exposes the following members.

Constructors
  NameDescription
Public methodStandardAdminStartArgs
Initializes a new instance of the StandardAdminStartArgs class
Top
Remarks
Arguments passed to Dynamicweb.Notifications.Standard.Admin.Started notification
Examples
C#
using Dynamicweb.Security.UserManagement;

namespace Dynamicweb.Examples.Notifications.Standard
{
    [Dynamicweb.Extensibility.Notifications.Subscribe(Dynamicweb.Notifications.Standard.Admin.Started)]
    public class AdminStartedObserver : 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.Admin.StartArgs))
                return;

            Dynamicweb.Notifications.Standard.Admin.StartArgs item = (Dynamicweb.Notifications.Standard.Admin.StartArgs)args;

            User user = User.GetCurrentBackendUser();

            //Pass user name to the notification e-mail
            string emailBody = string.Format("The user ({0}) has been logged-in.", user.Name);
        }
    }
}
See Also