![]() | StandardUserOnExtranetLoginFailedArgs Class |
Namespace: Dynamicweb.Notifications
The StandardUserOnExtranetLoginFailedArgs type exposes the following members.
Name | Description | |
---|---|---|
![]() | StandardUserOnExtranetLoginFailedArgs | Default constructor. |
Name | Description | |
---|---|---|
![]() | FailedReason |
Gets or sets the reason.
|
![]() | Password | The password specified for login |
![]() | Reason | Obsolete.
Gets or sets the reason.
|
![]() | Username | The username specified for login |
using Dynamicweb.Security.UserManagement; using System; namespace Dynamicweb.Examples.Notifications.Standard { [Dynamicweb.Extensibility.Notifications.Subscribe(Dynamicweb.Notifications.Standard.User.OnExtranetLoginFailed)] public class OnExtranetLogOnFailedObserver : 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.OnExtranetLoginFailedArgs)) return; Dynamicweb.Notifications.Standard.User.OnExtranetLoginFailedArgs item = (Dynamicweb.Notifications.Standard.User.OnExtranetLoginFailedArgs)args; //Throw exception if login is incorrect if(item.FailedReason == LogOnFailedReason.IncorrectLogin) throw new Exception("Incorrect login"); } } }