Skip to content

UpdateUser

Updates a user's properties.

1
$Membership.UpdateUser(identity: ( string | [Identity](./../Identity/index.md) ), properties: `avatar` : `large` : string

normal : string

small : string
The user's avatar URLs.

email : string
The user's email address.

firstname : string
The user's first name.

id : string
The provider-specific user ID.

language : string
The user's language.

lastname : string
The user's last name.

name : string
The user's full name.

otherProperties : Array<name : string
The name of the property.

value : string
The value of the property.>
Additional provider-specific properties to map.

password : string
Password of user.

providerName : string
The provider name. The default is

subjectId : string
The provider-specific subject ID.):Identity

Parameters

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

avatar : large : string

normal : string

small : string
The user's avatar URLs.

email : string
The user's email address.

firstname : string
The user's first name.

id : string
The provider-specific user ID.

language : string
The user's language.

lastname : string
The user's last name.

name : string
The user's full name.

otherProperties : Array<name : string
The name of the property.

value : string
The value of the property.>
Additional provider-specific properties to map.

password : string
Password of user.

providerName : string
The provider name. The default is

subjectId : string
The provider-specific subject ID. 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.

Setting a user password using the default emakin organization provider

1
2
3
4
5
6
var userId = 'e444bcae-edd0-4659-8d8d-65bb3d1fe82c';
$Membership.UpdateUser(userId, {
    providerName : 'Organization',
    id : '[email protected]',
    password : 'myPassword'
});

Associating an Active Directory logon with a user

1
2
3
4
5
6
var userId = 'e444bcae-edd0-4659-8d8d-65bb3d1fe82c';

$Membership.UpdateUser(userId, {
    providerName : 'LDAP',
    id : 'http://ldap.emakin.com/user/john.doe'
});

See Also