You are viewing this site as a guest. You can still ask questions and help others! Join our Dev2Dev IT Community to receive your own blog, share your knowledge, and much more.

How to use user session to get user id

1 reply [Last post]
Guest's picture
Guest

I am trying to assign the emailid of the user logged in to a value in my peoplecode for DirectConnect. Is there a function to get the current user that's signed in? %userid...etc so that I may use similar to this:
&REQUESTOR_EMAIL_SQL = CreateSQL("SELECT B.EMAILID FROM PSOPRDEFN B WHERE B.OPRID = %UserId", &EmailId);

Guest's picture
Guest
Re: How to use user session to get user id

I found that I could use the %OperatorId
SQLExec("SELECT B.EMAILID FROM PSOPRDEFN B WHERE B.OPRID = %OperatorId", &EmailId);
.......PV_DC_EXTRINSIC.VALUE.Value = &EmailId;