You have imported the required interfaces and gotten the required factories.
More information: User Management Functions for Users .
This procedure describes how to edit the common user attributes programmatically in the user store. Use this procedure if you cannot use the existing user administration tools to edit user attributes and need to customize your tools to change user attributes programmatically.
Some common user attributes are:
E-mail address
First name
Job title
Telephone number
This example gets the unique ID of the user demo_user. The method then gets the user and changes the value of the attribute myAttributeName in the namespace com.example to myValue .
public static void modifyUser_setEmail(String logonID, String email) { try { // Get the user. // Get the unique ID. // Check if the attribute is read-only or read-write. // Get a modifiable user object. // Write the changes to the user store. } else { // TODO: Handle attribute is not modifiable. } } catch (NoSuchUserException nsuex) { // TODO: Handle NoSuchUserException. } catch (NoSuchUserAccountException nsauex) { // TODO: Handle NoSuchUserAccountException. } catch (UMException umex) { // TODO: Handle UMException } catch (UMRuntimeException umrex) { // TODO: Handle UMRuntimeException } }