ActiveDirectoryMembershipUser.ActiveDirectoryMembershipUser(String, String, Object, String, String, String, Boolean, Boolean, DateTime, DateTime, DateTime, DateTime, DateTime) Constructor
Assembly: System.Web (in system.web.dll)
public ActiveDirectoryMembershipUser ( string providerName, string name, Object providerUserKey, string email, string passwordQuestion, string comment, bool isApproved, bool isLockedOut, DateTime creationDate, DateTime lastLoginDate, DateTime lastActivityDate, DateTime lastPasswordChangedDate, DateTime lastLockoutDate )
public ActiveDirectoryMembershipUser ( String providerName, String name, Object providerUserKey, String email, String passwordQuestion, String comment, boolean isApproved, boolean isLockedOut, DateTime creationDate, DateTime lastLoginDate, DateTime lastActivityDate, DateTime lastPasswordChangedDate, DateTime lastLockoutDate )
public function ActiveDirectoryMembershipUser ( providerName : String, name : String, providerUserKey : Object, email : String, passwordQuestion : String, comment : String, isApproved : boolean, isLockedOut : boolean, creationDate : DateTime, lastLoginDate : DateTime, lastActivityDate : DateTime, lastPasswordChangedDate : DateTime, lastLockoutDate : DateTime )
Not applicable.
Parameters
- providerName
The ProviderName for the membership user.
- name
The UserName for the membership user.
- providerUserKey
The ProviderUserKey for the membership user.
The Email address of the membership user.
- passwordQuestion
The PasswordQuestion for the membership user.
- comment
The Comment for the membership user.
- isApproved
The IsApproved value for the membership user.
- isLockedOut
The IsLockedOut value for the membership user.
- creationDate
The CreationDate for the membership user.
- lastLoginDate
The LastLoginDate for the membership user. This parameter is not used.
- lastActivityDate
The LastActivityDate for the membership user. This parameter is not used.
- lastPasswordChangedDate
The LastPasswordChangedDate for the membership user.
- lastLockoutDate
The LastLockoutDate for the membership user.
| Exception type | Condition |
|---|---|
|
providerUserKey is not a SecurityIdentifier object. - or - providerName is a null reference (Nothing in Visual Basic) 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.