Class Standard.Admin.StartArgs
- Namespace
- Dynamicweb.Notifications
- Assembly
- Dynamicweb.dll
Provides information about the Admin default page after the user logged in.
public class Standard.Admin.StartArgs : NotificationArgs
- Inheritance
-
Standard.Admin.StartArgs
- Inherited Members
Examples
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);
}
}
}
Remarks
Arguments passed to Dynamicweb.Notifications.Standard.Admin.Started notification