WebMatrix.WebData Provides basic role-management methods. Adds the specified user names to the specified roles. The user names to add. The roles to add the names to. Returns the user names that are associated with the specified role. The user names for the role. The name of the role. Returns a value that indicates whether a specified user is in a specified role. true if the user is in the role; otherwise, false. The user name. The name of the role. Returns a value that indicates whether a specified role exists. true if the role exists; otherwise, false. The name of the role. Provides security and authentication features for ASP.NET Razor pages. Changes the password for the specified user. true if the password is successfully changed; otherwise, false. The user name. The current password for the user. The new password. Gets a value that indicates whether an account has been confirmed as a valid account with the provider. true if the account is confirmed; otherwise, false. A confirmation message to pass to the authentication provider. Creates a new user account with the specified user name and password. A token from the provider that created the account. The user name. The password for the user. (Optional) true to specify that the account must be confirmed; otherwise, false. The default is false. Creates a new user and a new user account. A token from the provider that created the user and the account. The user name. The password for the user. (Optional) A dictionary that contains additional user attributes. The default is null. (Optional) true to specify that the account must be confirmed; otherwise, false. The default is false. Gets the ID for the current user. The ID for the current user. Gets the user name for the current user. The name of the current user. Generates a password reset token that can be sent a user in email. A token from the provider to send to the user. The user name. (Optional) The time in minutes until the password reset token expires. The default is 1440 (24 hours). Gets the ID for a user based on the user name. The ID of the logged-in user. The user name. Connects to a database that contains user information. The name of the connection string. The name of the database table that contains user information. The name of the database column that contains user IDs. The name of the database column that contains user names. true to indicate that tables should be created automatically; false to indicate that tables should not be created automatically. Connects to a database that contains user information using the specified membership or role provider. The name of the connection string. The name of the membership provider or role provider. The name of the database table that contains user information. The field that contains user identifier numbers. The field that contains user names. true to indicate that tables should be created automatically; false to indicate that tables should not be created automatically. Gets the authentication status of the current user. true if the current user is logged in; otherwise, false. The default is false. Returns a value that indicates whether the logged-in user has been confirmed by the provider. true if the user is confirmed; otherwise, false. The user name. Returns a value that indicates whether the user name of the logged-in user matches the specified user name. true if the logged-in user name matches ; otherwise, false. The user name to compare the logged-in user name to. Logs the user in. true if the user was logged in; otherwise false. The user name. The password for a user. (Optional) true to specify that the authentication token in the cookie should be persisted beyond the current session; otherwise false. The default is false. Logs the user out. If the user is not authenticated, sets the HTTP status to 401 (Unauthorized). If the current user is not a member of one of the specified roles, sets the HTTP status code to 401 (Unauthorized). The roles that are authorized to access a page. If the current user does not match the specified user ID, sets the HTTP status to 401 (Unauthorized). The ID of the user to compare. If the current user does not match the specified user name, sets the HTTP status to 401 (Unauthorized). The name of the user to compare. Changes a password. true if the password was changed; otherwise, false. A password reset token. The new password. Returns a value that indicates whether the specified user exists in the membership provider database. true if the membership provider found ; otherwise, false. The user name.