UpdateUserByUsername

Updates the system user information.

Returns – A UserResponse containing a User Object in the Users array.  (See RequestResponse in Appendix B)

Parameters

Name Type Description
encryptedToken string Required. Encrypted Token returned from client authentication. Returns null if token has expired or is invalid.
oldUsername string Required. The current username that needs to be provisioned.
salt string Required. Any combination of text and numbers that was used to encrypt the plain text password into encryptedPassword.
user User Required. User Object.

Example – C#

ServiceAPIClient ws = new ServiceAPIClient();

string oldUsername = “MyOldEmail@host.com”;
string salt = “Z1s6aXNQpjQ75wRX1ulI551sR1uHyg3YsOcPLeL9TaM”;
string encryptPassword = string.Empty;
UserResponse userResponse;

encryptedPassword = ((RequestResponse)ws.EncryptString(“password”, salt)).ReturnValue;

//The below example show all currently available fields allowed to be updates
User userConfig = new User();
userConfig.Username = “UserName”;
userConfig.FirstName = “FirstName”;
userConfig.LastName = “LastName”;
userConfig.Password = encryptedPassword;
userConfig.Company = “Company name”;
userConfig.Region = string.Empty;
userConfig.SubscriptionTypes = “Annual”;
userConfig.TimeZoneId = “Pacific Standard Time (Mexico)”;
userConfig.EmailSignature = “EmailSignature”;
userConfig.StatusCode = UserStatusCodes.Active;

userResponse = ws.UpdateUserByUsername(encryptedToken, salt, oldUsername, UserConfig);

//The below example show EmailSignature being update using the UserName required field
User userConfig = new User();
userConfig.Username = “UserName”; //Required field
userConfig.EmailSignature = “EmailSignature”;

userResponse = ws.UpdateUserByUsername(encryptedToken, salt, oldUsername, UserConfig);

//The below example show StatusCode being update using the SystemUserId required field
User userConfig = new User();
userConfig.StatusCode = UserStatusCodes.Active;

userResponse = ws.UpdateUserByUsername(encryptedToken, salt, oldUsername, UserConfig);