Easy Tutorial
❮ Met Websecurity Resetpassword Prop Webcontrol Calendar Showdayheader ❯

WebSecurity - CreateAccount()


Definition

The CreateAccount() method creates a new account in the user database with a username and password, and can optionally specify whether the user must explicitly confirm the account.


C# and VB Syntax


Parameters

Parameter Type Description
userName String The username
password String The user's password
requireConfirmation Boolean Returns true if the account must be confirmed using the token return value. Defaults to false.

Return Value

Type Description
String A token that can be sent to the user for account confirmation.

Errors and Exceptions

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

In the following cases, the CreateAccount() method will also throw a MembershipCreateUserException:


Technical Data

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

❮ Met Websecurity Resetpassword Prop Webcontrol Calendar Showdayheader ❯