WebSecurity.CreateUserAndAccount(String, String, Object, Boolean) WebSecurity.CreateUserAndAccount(String, String, Object, Boolean) WebSecurity.CreateUserAndAccount(String, String, Object, Boolean) Method

Definition

Creates a new user profile entry and a new membership account.

public static string CreateUserAndAccount (string userName, string password, object propertyValues = null, bool requireConfirmationToken = false);
static member CreateUserAndAccount : string * string * obj * bool -> string
Public Shared Function CreateUserAndAccount (userName As String, password As String, Optional propertyValues As Object = null, Optional requireConfirmationToken As Boolean = false) As String

Parameters

userName
String String String

The user name.

password
String String String

The password for the user.

propertyValues
Object Object Object

(Optional) A dictionary that contains additional user attributes. The default is null.

requireConfirmationToken
Boolean Boolean Boolean

(Optional) true to specify that the user account must be confirmed; otherwise, false. The default is false.

Returns

A token that can be sent to the user to confirm the user account.

Exceptions

The Initialize(String, NameValueCollection) method was not called.-or-The InitializeDatabaseConnection method was not called.-or-The SimpleMembershipProvider membership provider is not registered in the configuration of your site. For more information, contact your site's system administrator.

Applies to