It is @value that the user has an ID
## Example VB @Code Dim value as Boolean value=WebSecurity.HasUserId End CodeIt is @value that the user has an ID
* * * ## Remarks The **HasUserID** property is read-only. It cannot be changed via code. The **HasUserId** property only verifies whether the user has an ID in the **WebSecurity** database. It does not verify if the user account is valid (confirmed) or if the user is logged in. Use the **IsConfirmed()** method to verify if the user has been confirmed. Use the **IsAuthenticated** property to verify if the user is logged in. * * * ## Errors and Exceptions In the following cases, any access to the **WebSecurity** object will throw an **InvalidOperationException**: * The **InitializeDatabaseConnection()** method has not been called * **SimpleMembership** is not initialized (or is disabled in the site configuration) * * * ## Technical Data | Name | Value | | --- | --- | | Namespace | WebMatrix.WebData | | Assembly | WebMatrix.WebData.dll | * * WebSecurity Object](#)
YouTip