WebSecurity - IsConfirmed()
WebSecurity Object
Definition
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 true if the user has been confirmed,trueotherwise returnsfalse。 |
Errors and Exceptions
In the following cases, any access to theWebSecurityobject will throw aInvalidOperationException:
- InitializeDatabaseConnection()The method has not been called
- SimpleMembershipNot initialized (or disabled in website configuration)
Remarks
IsConfirmed()The method checks the user account identified by theuserNameparameter.
If the membership has been confirmed (the user confirmed the account by clicking the email link), the method returnstrue。
If the registration is not confirmed, the user cannot log in.
Technical Data
| Name | Value |
|---|---|
| Namespace | WebMatrix.WebData |
| Assembly | WebMatrix.WebData.dll |
WebSecurity Object Other Extensions