Skip to content

UpdateUser

Updates a user's properties.

1
$Membership.UpdateUser(identity: ( string | Identity ), properties: UserInfo):( Identity | null )

Parameters

( string | Identity ) identity
    The identity of the user to update.

UserInfo properties
    An object containing the properties to update for the user.

Returns

The updated user identity.

Remarks

The properties object is a JavaScript object that can contain a subset of user properties to update. Not all properties are required; only the properties specified in this object will be updated.

Examples

Set a user password with the default organization provider

1
2
3
4
5
$Membership.UpdateUser($Xml.Evaluate('User'), {
    providerName : 'Organization',
    id : '[email protected]',
    password : $Xml.Evaluate('NewPassword')
});

Associate a directory logon with a user

1
2
3
4
$Membership.UpdateUser($Xml.Evaluate('User'), {
    providerName : 'LDAP',
    id : 'ldap://ldap.example.com/user/john.doe'
});

See Also