Skip to content

Instantly share code, notes, and snippets.

@CorneAussems
Last active January 2, 2016 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CorneAussems/8335798 to your computer and use it in GitHub Desktop.
Save CorneAussems/8335798 to your computer and use it in GitHub Desktop.
import com.liferay.portal.service.ServiceContext
import com.liferay.portal.service.UserServiceUtil
try {
sc = new com.liferay.portal.service.ServiceContext()
users = UserServiceUtil.getCompanyUsers(10157, -1,-1 )
println(users.size())
for(i=0;i<users.size();i++){
user = users.get(i)
userId = user.getUserId()
println('userId='+userId+' screenname:'+user.getScreenName())
}
} catch (Exception e) {
println(e)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment