WebSecurity - IsConfirmed()
WebSecurity object
define
IsConfirmed() The method returns a value indicating whether the specified user has been confirmed.
C# and VB syntax
WebSecurity.IsConfirmed(
userName
);
Parameters
| Parameters | Type | Description |
|---|---|---|
| userName | String | Username |
Return Value
| Type | Description |
|---|---|
| Boolean | Returns if the user is confirmed true; otherwise, returns false。 |
Errors and exceptions
In the following cases, any access to the WebSecurity object will throw an InvalidOperationException:
- InitializeDatabaseConnection() The method is not called
- SimpleMembership Not initialized (or disabled in the website configuration)
Notes
IsConfirmed() The method checks the user account identified by the userName parameter.
If the membership is confirmed (the user confirmed the account by clicking the email link), the method returns true。
If the registration is not confirmed, the user cannot log in.
Technical data
| Name | Value |
|---|---|
| Namespace | WebMatrix.WebData |
| Assembly | WebMatrix.WebData.dll |
WebSecurity object