This content has been marked as final.
Show 1 reply
-
1. Re: Access OrganizationService
hanspeter Oct 6, 2010 10:12 AM (in response to cblumenro).. for me this works:
WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
ExoContainer container = context.getApplication().getApplicationServiceContainer();
OrganizationService orgService = (OrganizationService) container.getComponentInstanceOfType(OrganizationService.class);
User user = null;
try {
user = orgService.getUserHandler().findUserByName("XYZ");
....
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
hope this helps