Skip to content

CreateUser

Creates a new user with the specified properties.

1
$Membership.CreateUser(properties: UserInfo):Identity

Parameters

UserInfo properties
    An object containing the properties for the new user.

Returns

The created user's Identity.

Remarks

The properties object is a JavaScript object that can contain various user properties. Not all properties are required; only the properties specified in this object will be used to create the user.

Examples

Create a user from form data

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
var user = $Membership.CreateUser({
    id : $Xml.Evaluate('Email'),
    email : $Xml.Evaluate('Email'),
    firstname : $Xml.Evaluate('FirstName'),
    lastname : $Xml.Evaluate('LastName'),
    language : 'en'
});

// let the user choose a password
$Membership.SendLogonRegistrationEMail(user);

See Also