Adding a user data object with required and custom properties to the CMS

  • Updated

It is a simple task to add users to Ektron via the Ektron Framework API.

When entering any user data object into Ektron, you need to complete two types of properties. Below is an example of a user data object for a membership user that has the required properties and customer properties assigned to it.

More information on the UserManager can be found here .

Use this syntax to add information for CMS or Membership users with custom properties.

UserManager uMgr = new UserManager();

UserData uData = new UserData();

//required user information

uData.Username = "testUserName";

uData.FirstName = "testFirstName";

uData.LastName = "testLastName";

uData.Password = "qwerty123";

uData.Email = "test@testEmail.com";

uData.DisplayName = "testDisplayName";

uData.Address = "1243 Test Addresss Nashua, NH 03063";

uData.IsMemberShip = true;

//custom property user information   

uData.CustomProperties = uMgr.GetCustomPropertyList();

uData.CustomProperties["Time Zone"].Value = "Central Standard Time";

uData.CustomProperties["Private Profile"].Value = "Public";

uData.CustomProperties["Phone"].Value = "603-333-3333";

uMgr.Add(uData);