The modifyUserData method
- Organization of this page
Description
Corrects user information. If the specified user does not exist, an exception occurs.
With this method, existing attributes are overwritten with only the modified attributes that are specified after creation of the UserData object.
Suppose, for example, the existing user information in the repository includes the attributes shown below.
|
Attribute name |
Full name |
Tel |
|---|---|---|
|
Value |
Hitachi Taro |
111-1111 |
|
222-2222 |
In the parameter of this method, the following code is used to specify the created UserData object:
UserData data = new UserData();
data.addAttribute("tel", "111-2222");The repository stores the following new user information:
|
Attribute name |
Full name |
Tel |
|---|---|---|
|
Value |
Hitachi Taro |
111-2222 |
|
-- |
Legend:
--: No information is stored.
If an exception occurs during the subcontext update after this method is called, user information is incompletely updated. In this case, remove the cause and then call this method again.
Syntax
public void modifyUserData(String uid,
UserData UserData)
throws ObjectClassError, NamingException;
Parameters
- uid:
-
Specifies the user ID.
- userData:
-
Specifies the UserData object that holds the user information.
Exceptions
- com.cosminexus.admin.auth.api.repository.ldap.ObjectClassError:
-
The object class necessary for creating an entry on the LDAP directory server is not specified.
- javax.naming.CommunicationException:
-
An attempt to connect to the LDAP directory server has failed.
- javax.naming.NameNotFoundException:
-
The specified user ID is missing.
- Other JNDI exceptions:
-
Events such as a bind DN specification error
Return value
None