Skip to Content
author's profile photo Former Member
Former Member

IUserFactory.getUniqueIDs() doesn't return all users in the portal - HELP!!

I use the following code snippet in a little program that batch inject usermapping data into the database. In short, the problem is that for some reasons uf.getUniqueIDs() or something doesn't return all users in the portal. I found out this problem by looking at systemouts in the log file and not being able to find my own ID. We have between 20000-30000 in the portal and the program goes through 20031 user records.

I have no idea why it's not returning all users. Please advice. this is so urgent. thank you in advance.

try {
  IUserFactory uf = UMFactory.getUserFactory();
  ISearchResult result = uf.getUniqueIDs();
  while (result.hasNext()) {
    String uniqueid = result.next().toString();
    IUser user = uf.getUser(uniqueid);
    String userid = user.getUniqueName();
  }
} catch(Exception e) {
  //systemout
}

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 26, 2005 at 09:27 PM

    please help

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 27, 2005 at 09:38 AM

    Hi,

    I tried the code u have given it shows no problem.. working fine for me ... I tired with webdynpro and created a webdynpro iview. It listed all the users available in my portal.

    Regards

    gEorgE

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 27, 2005 at 09:47 AM

    Hi mike,

    i faced same problem in my work.

    But i got solved from my self.

    I tried to get all the users from the group 'Everyone'. So i got all the users of EP.

    Basically all users are member of 'Everyone' group.

    Hope it solve ur problem

    award me points if my solution helped u.

    kantha

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 06, 2012 at 05:04 PM

    All, I have a similar problem.

    In my enterprise, UME is configured to pull data from 2 data sources (LDAP, EXTERNAL_LDAP). My objective is to get all users from the data source EXTERNAL_LDAP.


    user.getUniqueName() -- is returning just the userid.

    user.getUniqueID() -- is returning "USER.EXTERNAL_LDAP.<userid>"


    So, I thought of getting all the users using

    ISearchResult result = userFactory.getUniqueIDs();


    and then looping result to get only those users that start with "USER.EXTERNAL_LDAP". But somehow this code is not working fine in all environments. I get the results in sandbox and dev but when I try to run the code in QA, I get only 400 users at a time.


    Can you please help me with this ?


    I also tried this code to just retrive users from EXTERNAL_LDAP.

    IUserFactory userFactory = UMFactory.getUserFactory();

    ISearchResult result = userFactory.getUniqueIDs();

    log(result.size());

    IUserSearchFilter sf = userFactory.getUserSearchFilter();

    sf.setUniqueName("*USER.EXTERNAL_LDAP.*", ISearchAttribute.LIKE_OPERATOR, false);

    ISearchResult sr = userFactory.searchUsers(sf);

    log(sr.size());


    result -- returns all the users from LDAP & EXTERNAL_LDAP.

    sr - returns 0

    As I mentioned earlier, as user.getUniqueName() is not giving me the result in the format, "USER.EXTERNAL_LDAP.<userid>", I am not able to use this code to filter the users based on uniquename. Also, I dont see any search filter like sf.setUniquerID(...)


    Please help. !!

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.