on 02-16-2007 3:05 PM
Hi Experts,
Using UME API I can access almost all data of a portal user, but I couldn't find how to access the "Organizational Unit" data of a user. This information is under the "Additional Information" TAB for NW04s.
If anyone faced this issue, plase let me know how to do that.
regards
HUSEYIN,
Most probably it's accessible only via generic UME IPrincipal API:
userObj.getAttribute(namespace, attrName);
To find out all possible namespaces/attributes use the following:
final StringBuffer result = new StringBuffer();
final String[] namespaces = userObj.getAttributeNamespaces();
for (int i = 0, c = namespaces.length; i < c; i++) {
final String ns = namespaces<i>;
final String[] attributes = userObj.getAttributeNames(ns);
for (int j = 0; k = attributes.length; j < k; j++)
result.append(ns).append(':').append(attributes[j]).append('n');
}
Then analyze output of result.toString() and try to find out what attribute represents OU.
Valery Silaev
SaM Solutions
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Altug,
You are getting array of strings, i.e. String[] orgunit (try to cast returned value)
Then you may access individual items via orgunit[idx], most probably you have only orgunit[0] item set, anyway check orgunit.length to make sure how many org. units are returned.
Valery Silaev
SaM Solutions
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.