System.Web 2.0.0.0 System.Object

The object is used to represent a single membership user in the membership data store. It exposes information about the membership user such as the e-mail address, and provides functionality for the membership user such as the ability to change or reset his or her password.

If you are not familiar with the membership features of ASP.NET, see Introduction to Membership before continuing. For a list of other topics related to membership, see Managing Users By Using Membership.

A object is returned by the and methods or as part of a returned by the , , and methods.

A object is required by the method when you want to update the information for an existing membership user.

Exposes and updates membership user information in the membership data store.

- Constructor

  The constructor is not intended to be used from your code.

  Creates a new instance of a object for a class that inherits the class.

  2.0.0.0
- Constructor

  Creating a new 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 method. Note that the method returns a object for the membership user added to the data store.

  objects can be constructed in application code for use with the method. Alternatively, you can also pass a object returned from the , , , , or method to the method as well.

  objects are also commonly constructed by membership-provider implementations for the , , , , and methods.

  The , , and parameters are all trimmed before being used.

  Creates a new membership user object with the specified property values.

  The string for the membership user.
  The string for the membership user.
  The identifier for the membership user.
  The string for the membership user.
  The string for the membership user.
  The string for the membership user.
  The value for the membership user.
  true to lock out the membership user; otherwise, false.
  The object for the membership user.
  The object for the membership user.
  The object for the membership user.
  The object for the membership user.
  The object for the membership user.
  2.0.0.0
- Method
  System.Boolean `` ``

  calls the method of the membership provider referenced by the property to update the password for the membership user in the membership data store.

  The membership provider may have restrictions on the size of the password. For size limitations, see the documentation for the membership provider.

  Updates the password for the membership user in the membership data store.

  true if the update was successful; otherwise, false.

  The current password for the membership user. The new password for the membership user. 2.0.0.0
- Method
  System.Boolean `` `` ``

  calls the method of the membership provider referenced by the property to update the password question and answer for the membership user in the membership data store.

  The membership provider may have restrictions on the size of the password question and answer. For size limitations, see the documentation for the membership provider.

  Updates the password question and answer for the membership user in the membership data store.

  true if the update was successful; otherwise, false.

  The current password for the membership user. The new password question value for the membership user. The new password answer value for the membership user. 2.0.0.0
- Property
  System.String To be added.

  The property can be used to store custom information for a membership user that is specific to an application. The amount of information that can be stored in the property for a is defined by the membership provider referenced by the property. If your application requires more space to store user information than is allowed by the membership provider, you can implement a custom membership provider, or use the user .

  Gets or sets application-specific information for the membership user.

  2.0.0.0
- Property
  System.DateTime To be added.

  The sets the , , , and date to the same date and time when a membership user is created by the method.

  Gets the date and time when the user was added to the membership data store.

  2.0.0.0
- Property
  System.String To be added. To be added.

  Gets or sets the e-mail address for the membership user.

  2.0.0.0
- Method
  System.String

  calls the method of the membership provider referenced by the property to retrieve the password for the membership from the membership data store.

  If is false, the membership provider will return an exception. If the provider supports passwords with a of , you will be unable to retrieve the password for the membership user and should consider making use of the method when a user has forgotten his or her password.

  A will be thrown if enablePasswordRetrieval is set to true and passwordFormat is set to Hashed in the Web.config file for the ASP.NET application.

  If is true, you must use the overload that takes a password answer as a parameter and supply the password answer for the membership user. If a password answer is required and an incorrect password answer is supplied, a is thrown by the membership provider.

  Gets the password for the membership user from the membership data store.

  The password for the membership user.

  2.0.0.0
- Method
  System.String `` To be added.

  calls the method of the membership provider referenced by the property to retrieve the password for the membership user from the membership data store. If a password answer is required and an incorrect password answer is supplied, a is thrown by the membership provider.

  If is false, the membership provider will return an exception. If the provider supports passwords with a of , you will be unable to retrieve the password for the membership user and should consider making use of the method when a user has forgotten his or her password.

  A will be thrown if enablePasswordRetrieval is set to true and passwordFormat is set to Hashed in the Web.config file for the ASP.NET application.

  If is false, you can supply null for the parameter, or use the overload that does not take any parameters.

  Gets the password for the membership user from the membership data store.

  The password for the membership user.

  2.0.0.0
- Property
  System.Boolean To be added.

  The value for a membership user is checked during the call to by the . If the property is set to false, the method returns false even if the supplied user name and password are correct.

  Gets or sets whether the membership user can be authenticated.

  2.0.0.0
- Property
  System.Boolean To be added.

  Users are most commonly locked out and cannot be validated by the method when the is reached within the .

  Users can also be locked out if you use the or overload that accepts a password answer and the number of bad answers entered by the user reaches the within the .

  To set this property to false and let the user try to log in again, you can use the method.

  Gets a value indicating whether the membership user is locked out and unable to be validated.

  2.0.0.0
- Property
  System.Boolean To be added.

  A user is considered online if the current date and time minus the property value is earlier than the for the user.

  The for a user is updated to the current date and time by the , and methods, and can be updated by some of the overloads of the method.

  The property value for a user is updated by the classes in the and the namespaces whenever user data is retrieved from or set at the data source. If your application uses the same data source to store user information, and your and are configured with the same applicationName as your , then the and properties of the user will reflect this behavior.

  Gets whether the user is currently online.

  2.0.0.0
- Property
  System.DateTime To be added.

  The for a user is updated to the current date and time by the and methods, and can be updated by some overloads of the method. You can use the method to set the property to a specific date and time.

  The is used to determine whether a user is online. A user is considered online if the current date and time minus the property value is earlier than the for the user.

  The sets the , , , and date to the same date and time when a membership user is created by the method.

  The for a user is updated by the classes in the and the namespaces whenever user data is retrieved from or set at the data source. If your application uses the same data source to store user information, and your and are configured with the same applicationName as your , then the and properties of the user will reflect this behavior.

  Gets or sets the date and time when the membership user was last authenticated or accessed the application.

  2.0.0.0
- Property
  System.DateTime To be added.

  Users are most commonly locked out when the is reached within the .

  Users can also be locked out if you use the or overload that accepts a password answer and the number of bad answers entered by the user reaches the within the .

  The default value for the property is determined by the membership provider. For example, when a membership user is created using the provider, the property for the user is initially set to 01/01/1754.

  Gets the most recent date and time that the membership user was locked out.

  2.0.0.0
- Property
  System.DateTime To be added.

  For new users, the is equal to the if the user has not yet logged on. The is updated to the current date and time if a call to the method is successful.

  You can also modify the last login date by setting the property of a and passing the modified object to the method.

  The sets the , , , and date to the same date and time when a membership user is created by the method.

  Gets or sets the date and time when the user was last authenticated.

  2.0.0.0
- Property
  System.DateTime To be added.

  The sets the , , , and date to the same date and time when a membership user is created by the method.

  Gets the date and time when the membership user's password was last updated.

  2.0.0.0
- Property
  System.String To be added.

  If is true, then the password answer for a membership user must be supplied to the and methods. The serves as a reminder to the membership user of what his or her password answer is. Once the membership user has supplied a password answer, the answer value can be supplied to the or method.

  Gets the password question for the membership user.

  2.0.0.0
- Property
  System.String To be added.

  The property exposes the name of the membership provider that manages the information for the . You can access the specific membership provider instance for a membership user by using the property of the class, whether or not the provider is the default provider for the application. For example, you may create a method that takes a object as input and updates the based on your business logic. You can ensure that the appropriate membership provider is used to update the by calling the method of the membership provider from the collection that is indexed by the property value.

  Gets the name of the membership provider that stores and retrieves user information for the membership user.

  2.0.0.0
- Property
  System.Object To be added.

  The property exposes the identifier from the membership data source typed as object. The type of the identifier depends on the or the . In the case of the , the can be cast as a , since the stores the user identifier as a .

  Gets the user identifier from the membership data source for the user.

  2.0.0.0
- Method
  System.String

  calls the method of the membership provider referenced by the property to reset the password for the membership user to a new, automatically generated password. The new password is then returned to the caller.

  If is false, the membership provider will return an exception.

  If is true, you must use the overload that takes a password answer as a parameter and supply the password answer for the membership user. If a password answer is required and an incorrect password answer is supplied, a is thrown by the membership provider.

  Resets a user's password to a new, automatically generated password.

  The new password for the membership user.

  2.0.0.0
- Method
  System.String `` To be added.

  calls the method of the membership provider referenced by the property to reset the password for the membership user to a new, automatically generated password. The new password is then returned to the caller.

  If is false, the membership provider will return an exception.

  If is false, you can supply null for the parameter, or use the overload that does not take any parameters.

  If a password answer is required and an incorrect password answer is supplied, a is thrown by the membership provider.

  Resets a user's password to a new, automatically generated password.

  The new password for the membership user.

  2.0.0.0
- Method
  System.String To be added.

  Returns the user name for the membership user.

  The for the membership user.

  2.0.0.0
- Method
  System.Boolean

  Users are most commonly locked out and cannot be validated by the method when the is reached within the .

  Users can also be locked out if you use the or overload that accepts a password answer and the number of bad answers entered by the user reaches the value of within the .

  Your implementation of this method should set the property to false, set the property to the current date, and reset any counters that you use to track the number of failed log in attempts and so forth.

  Clears the locked-out state of the user so that the membership user can be validated.

  true if the membership user was successfully unlocked; otherwise, false.

  2.0.0.0
- Property
  System.String To be added.

  A membership user's is used in conjunction with the membership user's password to authenticate the membership user.

  The of a identifies a unique user for each application that uses for authentication. An application is identified by the membership . The same user name can be used in multiple applications for different users. Alternatively, a single user name can be used to identify a user for multiple applications, provided the applications are configured with the same .

  You can retrieve a object for a membership user by passing the user name to one of the overloads of the method, or as a member of a returned from the , , or method.

  You can retrieve the user name for a membership user if the e-mail address for the user is known, by using the method.

  Gets the logon name of the membership user.

  2.0.0.0