6 Replies Latest reply on May 21, 2010 3:51 AM by Jozsef Szalai

    How can I retrieve the email address of a user ?

    Benjamin Janssens Newbie

      I though that the email address of a user was stored in the set of Principals of a user, I try to list it :

       

      Identity identity = ConversationState.getCurrent().getIdentity();
      Iterator<Principal> u = identity.getSubject().getPrincipals().iterator();
      
      Utils.trace(getClass(), "Principals:");
      
      while (u.hasNext())
      {
        Utils.trace(getClass(), u.next().toString());
      }
      

       

       

      And for the user root :

       

      [2010-04-01 19:54:50,573] TRACE [AuthenticatorBean] Principals:
      [2010-04-01 19:54:50,573] TRACE [AuthenticatorBean] Roles
      [2010-04-01 19:54:50,573] TRACE [AuthenticatorBean] root

       

       

      How can I retrieve the email address of a user ?