Easy Tutorial
❮ Prop Webcontrol Style Height Prop Webcontrol Checkbox Text ❯

WebSecurity - UserExists()


Definition

The UserExists() method indicates whether the user already exists in the WebSecurity database.


C# and VB Syntax


Parameters

Parameter Type Description
userName String The username

Return Value

Type Description
Boolean Returns true if the user exists, otherwise returns false.

Errors and Exceptions

In the following cases, any access to the WebSecurity object will throw an InvalidOperationException:


Remarks

The UserExists() method only verifies whether the user already exists in the user profile table.

It does not verify whether the membership account for the user exists, whether the user has been confirmed, or whether the user is logged in.


Technical Data

Name Value
Namespace WebMatrix.WebData
Assembly WebMatrix.WebData.dll

❮ Prop Webcontrol Style Height Prop Webcontrol Checkbox Text ❯