Overview
Updates a user with specified propertiesIdentity $Membership.UpdateUser(identity: ( string | Identity ), properties: UserInfo)
Arguments
( string | Identity ) identity
User identity
UserInfo properties
User properties
Returns
Updated user identityRemarks
Properties object is a javascript object with may contain the following properties. Not all properties are required, only specified properties are updated.
Example
Set a user password with default emakin organization provider.
var userId = 'e444bcae-edd0-4659-8d8d-65bb3d1fe82c'; $Membership.UpdateUser(userId, { providerName : 'Organization', id : 'john.doe@6kare.com', password : 'myPassword' });
Example
Associate active directory logon with a user
var userId = 'e444bcae-edd0-4659-8d8d-65bb3d1fe82c'; $Membership.UpdateUser(userId, { providerName : 'LDAP', id : 'http://ldap.emakin.com/user/john.doe' });
Types
UserInfo
{
// Avatar urls of user
avatar :
{
large : string
normal : string
small : string
}
UserInfoPropery
{
// Name of property
name : string
// Value of property
value : string
}