1 Reply Latest reply on Jun 17, 2010 12:57 AM by Trong Tran

    GateIn User Password Problem

    Benjamin Seyinbour Expert

      Hello All,


      Firstly, I log in to Gatein as admin, and then in my program and try to get my user detail. I am able to retrieve the user ( org.exoplatform.services.organization.User) details and print the firstName, lastName, userName values but password is always null.


      Here is my code for retrieving Gatein User


      protected User getPortletUser() {

      User portletUser = null;


      PortalRequestContext context = PortalRequestContext.getCurrentInstance();

      // Get the logon user

      String remoteUserName = context.getRemoteUser();

      PortalContainer portalContainer = PortalContainer.getInstance();


      OrganizationService orgService= (OrganizationService) portalContainer.getComponentInstanceOfType(OrganizationService.class);


      if (remoteUserName != null) {

      portletUser = orgService.getUserHandler().findUserByName(remoteUserName);

      ValidatorUtils.isNotNull(portletUser, "Could not load portlet user details for " + remoteUserName);



      } catch (Exception e) {}


      return portletUser;





      Thanks for your help.