ActiveDirectoryMembershipUser Constructor (String, String, Object, String, String, String, Boolean, Boolean, DateTime, DateTime, DateTime, DateTime, DateTime)

 

Creates a new instance of the ActiveDirectoryMembershipUser class with the specified property values.

Namespace:   System.Web.Security
Assembly:  System.Web (in System.Web.dll)

Public Sub New (
	providerName As String,
	name As String,
	providerUserKey As Object,
	email As String,
	passwordQuestion As String,
	comment As String,
	isApproved As Boolean,
	isLockedOut As Boolean,
	creationDate As Date,
	lastLoginDate As Date,
	lastActivityDate As Date,
	lastPasswordChangedDate As Date,
	lastLockoutDate As Date
)

Parameters

providerName
Type: System.String

The ProviderName for the membership user.

name
Type: System.String

The UserName for the membership user.

providerUserKey
Type: System.Object

The ProviderUserKey for the membership user.

email
Type: System.String

The Email address of the membership user.

passwordQuestion
Type: System.String

The PasswordQuestion for the membership user.

comment
Type: System.String

The Comment for the membership user.

isApproved
Type: System.Boolean

The IsApproved value for the membership user.

isLockedOut
Type: System.Boolean

The IsLockedOut value for the membership user.

creationDate
Type: System.DateTime

The CreationDate for the membership user.

lastLoginDate
Type: System.DateTime

The LastLoginDate for the membership user. This parameter is not used.

lastActivityDate
Type: System.DateTime

The LastActivityDate for the membership user. This parameter is not used.

lastPasswordChangedDate
Type: System.DateTime

The LastPasswordChangedDate for the membership user.

lastLockoutDate
Type: System.DateTime

The LastLockoutDate for the membership user.

Exception Condition
ArgumentException

providerUserKey is not a SecurityIdentifier object.

- or -

providerName is null and a provider is not set in the application's configuration file.

Creating a new ActiveDirectoryMembershipUser object does not add a new membership user object to the membership data store. To add a new membership user to the membership data store, use the CreateUser method. Note that the CreateUser method returns an ActiveDirectoryMembershipUser object for the membership user added to the data store.

ActiveDirectoryMembershipUser objects are commonly constructed in application code for use with the UpdateUser method, although you can also pass an ActiveDirectoryMembershipUser object returned from the CreateUser, GetUser, GetAllUsers, FindUsersByName, or FindUsersByEmail method to the UpdateUser method as well.

ActiveDirectoryMembershipUser objects are also commonly constructed by membership provider implementations for the CreateUser, GetUser, GetAllUsers, UpdateUser, FindUsersByName, and FindUsersByEmail methods.

.NET Framework
Available since 2.0
Return to top
Show: