cancel
Showing results for 
Search instead for 
Did you mean: 

Manager of user

ismail1
Champ in-the-making
Champ in-the-making
Hi,
does IdentityService hava a method for getting the manager of a user? or should we develop a bean which uses ldap api and connects the ldap independently to get the manager?

I could get the users email as:

  public String getMailForUser(String userId) {
       User user = getIdentityService().createUserQuery().userId(userId).singleResult();
       return user.getEmail();
     }
2 REPLIES 2

ismail1
Champ in-the-making
Champ in-the-making
sorry, that method only works for default demo users.  When you integrate active directory ldap server as stated in guide, user.getEmail() returns null…

jbarrez
Star Contributor
Star Contributor
That is because the LDAP impl will not fetch the email from ldap and populate the pojo.
Should be easily fixable by extending the ldap code.