How to get a single User info from [ login + password ]

Hi,

I found processengine.getIdentityService().checkPassword(login,password)
which return a boolean (i would like a single User)

I found processengine.getIdentityService().createUserQuery().userId(login).list();
which returns a list of Users (i would like a single user)

Is there a function(login, password) which returns a single User ?

Regards
:taxi::red_car::fire_engine::taxi::red_car::fire_engine::taxi::red_car::fire_engine:

Hi,

You can use processengine.getIdentityService().createUserQuery().userId(login).singleResult() to get a single User object.

Best regards,

Tijs

Ok, but β€œuserId(login).list()” says that several users may have the same login, if it is the case, which user is returned by userId(login).singleResult() ???

No, the list method is always there because it is generic as part of the user query api. With the same login there should always be one user that is found.

Best regards,

Tijs

1 Like