WebSecurity IsConfirmed method
definition
IsConfirmed () method returns a value that specifies whether the user has been identified instructions.
C # and VB syntax
WebSecurity.IsConfirmed( userName );
parameter
参数 | 类型 | 描述 |
---|---|---|
userName | String | 用户名 |
return value
类型 | 描述 |
---|---|
Boolean | 如果用户已被确认,则返回 true ,否则返回 false 。 |
Errors and exceptions
In the following scenario, any access to WebSecurity object will throw an InvalidOperationException:
- InitializeDatabaseConnection () method has not been called
- SimpleMembership not initialized (or disabled in the site configuration)
Remark
IsConfirmed () method checks the user account identified by a userName parameter.
If the member has been recognized (by clicking on the user account confirmation e-mail link), the method returns true.
If the registration is not confirmed, the user can not log on.
Technical data
名称 | 值 |
---|---|
Namespace | WebMatrix.WebData |
Assembly | WebMatrix.WebData.dll |
WebSecurity objects