Fórumok
users and organization
bhargavi m, módosítva 9 év-val korábban
users and organization
Junior Member Bejegyzések: 47 Csatlakozás dátuma: 2012.04.05. Legújabb bejegyzések
Hi all,
I want to get list of users where they are not assigned to any of the organization
I want to get list of users where they are not assigned to any of the organization
bhargavi m, módosítva 9 év-val korábban
RE: users and organization (Válasz)
Junior Member Bejegyzések: 47 Csatlakozás dátuma: 2012.04.05. Legújabb bejegyzések
Hey i solved this issue by fallowing code
List<User> usersList=UserLocalServiceUtil.getUsers(0, -1);
for(User temp:usersList)
{
List<Organization> org=temp.getOrganizations();
if(org.size() == 0)
{
System.out.println(temp.getUserId());
}
}
List<User> usersList=UserLocalServiceUtil.getUsers(0, -1);
for(User temp:usersList)
{
List<Organization> org=temp.getOrganizations();
if(org.size() == 0)
{
System.out.println(temp.getUserId());
}
}