Dynamicweb 8 Documentation
ValidateUserNotificationArgs Class
Members  Example 

Represents a validate user notification agruments.
Object Model
ValidateUserNotificationArgs ClassUser Class
Syntax
'Declaration
 
Public Class ValidateUserNotificationArgs 
   Inherits Dynamicweb.Extensibility.NotificationArgs
public class ValidateUserNotificationArgs : Dynamicweb.Extensibility.NotificationArgs 
Example
[Dynamicweb.Extensibility.Subscribe(Dynamicweb.Modules.UserManagement.Notifications.UserValidated)]
public class ValidateUserObserver1 : Dynamicweb.Extensibility.NotificationSubscriber
{
    public override void OnNotify(string notification, Dynamicweb.Extensibility.NotificationArgs args)
    {
        if (args == null || !(args is Dynamicweb.Modules.UserManagement.ValidateUserNotificationArgs))
            return;
        Dynamicweb.Modules.UserManagement.ValidateUserNotificationArgs item = (Dynamicweb.Modules.UserManagement.ValidateUserNotificationArgs)args;
        Dynamicweb.Modules.UserManagement.User user = item.Subject;
        Dictionary<string, Dynamicweb.Modules.UserManagement.UMFormField> error = item.Errors;
        if(!Dynamicweb.Base.ValidateEmail(user.Email))
        {
            string key = string.Format("UserManagement_Form_{0}", "Email2");
            error.Add(key, new Dynamicweb.Modules.UserManagement.UMFormField(key, "Email", "The email is not valid from. Custom! "));
        }
    }
}
Inheritance Hierarchy

System.Object
   Dynamicweb.Extensibility.NotificationArgs
      Dynamicweb.Modules.UserManagement.ValidateUserNotificationArgs

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ValidateUserNotificationArgs Members
Dynamicweb.Modules.UserManagement Namespace

Send Feedback