Creates account and performs a customAction delegate upon successfull creation. If activation is required, an activation e-mail is sent, otherwise newly created user is immediatelly approved.

Namespace: MonoSoftware.MonoX.Utilities
Assembly: MonoX (in MonoX.dll) Version: 5.1.40.5065 (5.1.40.5065)

Syntax

C#
public static bool CreateAccount(
	string userName,
	string password,
	string email,
	bool isApproved,
	Action<MembershipUser> customAction,
	out MembershipUser membershipUser,
	out string errorMessage
)
Visual Basic
Public Shared Function CreateAccount ( 
	userName As String,
	password As String,
	email As String,
	isApproved As Boolean,
	customAction As Action(Of MembershipUser),
	<OutAttribute> ByRef membershipUser As MembershipUser,
	<OutAttribute> ByRef errorMessage As String
) As Boolean
Visual C++
public:
static bool CreateAccount(
	String^ userName, 
	String^ password, 
	String^ email, 
	bool isApproved, 
	Action<MembershipUser^>^ customAction, 
	[OutAttribute] MembershipUser^% membershipUser, 
	[OutAttribute] String^% errorMessage
)
F#
static member CreateAccount : 
        userName : string * 
        password : string * 
        email : string * 
        isApproved : bool * 
        customAction : Action<MembershipUser> * 
        membershipUser : MembershipUser byref * 
        errorMessage : string byref -> bool 

Parameters

userName
Type: System..::..String
User Name
password
Type: System..::..String
Password
email
Type: System..::..String
Email
isApproved
Type: System..::..Boolean
Specifies whether the user is immediatelly approved.
customAction
Type: System..::..Action<(Of <(<'MembershipUser>)>)>
A custom action done after successfull creation. If the action fails (throws an exception), a rollback of account creation is performed.
membershipUser
Type: System.Web.Security..::..MembershipUser%
A newly created MembershipUser object, null if creation fails.
errorMessage
Type: System..::..String%
Error message describing the reason of the account creation failure.

Return Value

Type: Boolean

See Also