AnsweredAssumed Answered

Current autheinticaed user

Question asked by bargan on Jul 22, 2014
Latest reply on Nov 24, 2015 by heba
In my process i have to specify if the current user is a manager or not, so when a user log in activiti-explorer, i have to retry the id of this user.
So  in my  java  class i used:  " String initiator = Authentication.getAuthenticatedUserId(); " to compar this value with a sql query (to know if this user is a manager or not).
My questions:
*1) Is this expression "Authentication.getAuthenticatedUserId()" is all what i need to get this current authentificated user?
    2) Am i right to use sql queries like this one :
   " SELECT manager FROM service INNER JOIN relationship ON service.id_service = relationship.id_service WHERE id_user='" + initiator + "'";  "
   (i tested it in my java class and its working) ?

Please help,