cancel
Showing results for 
Search instead for 
Did you mean: 

Getting user email registered in the database

dorigon
Champ in-the-making
Champ in-the-making
Oops.

I wonder if there is how I get email from a registered user in the database knowing your id? I am using the activiti-explorer 5.18.0
5 REPLIES 5

vasile_dirla
Star Contributor
Star Contributor
Hi,
could you explain a bit more what do you want to do?
do you want to get the email address of a user by userId ?

dorigon
Champ in-the-making
Champ in-the-making
I have an XML that contains a task for sending email, this email would be sent to the user who initiated the task that is I have his id_ but do not have the email, I did not want every time he informace the email and that email alreadyIt is registered in the database table in act_id_user I just want to search it. Is there any way to do?

vasile_dirla
Star Contributor
Star Contributor
did you try to find users by id like that?
<code>
identityService = processEngine.getIdentityService();
    user = identityService.createUserQuery().userId(userId).singleResult();
</code>

dorigon
Champ in-the-making
Champ in-the-making
But where do I put this? and I do not want to modify or add java code. I wonder if there is any function that returns it to my bpm20.xml

vasile_dirla
Star Contributor
Star Contributor
could you show us your XML file ? (please attach it here, NOT paste it in the message)