Announcement

Collapse
No announcement yet.

Need Valence Current_User

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Need Valence Current_User

    I'm pulling in Current_User from an autocode program and the value is QTMHHTP1. I'm looking for the Valence user. This user is not setup in the IBMi.

    I found the below code and tried to compile. 7030 Errors for SessonID, sessionDS, VVALIAS, VVHTTP_IN and vvSecure.

    Of course, you could also just retrieve the Valence-assigned System i user within your programs straight from the session variable, like this:

    Code:
    // retrieve session ID
    SessionID = vvHttp_in('sid');

    // retrieve session variable, plug into session data structure
    sessionDS = vvSecure_getSessVar(SessionID :VVSESSVAR);

    // plug System i user into local field
    Cur_User = SessionDS.VValias;
    Last edited by JosephHarriman; 08-03-2016, 03:02 PM.

  • #2
    You should be able to use vvUtility_getCurrentUser() to get that value. Something like this:

    Code:
    valenceUser = vvUtility_getCurrentUser(valenceId);
    In this case, the user name would be returned to valenceUser, and valenceId would contain the numeric Valence user ID.

    Comment


    • #3
      Thanks Rob,

      I got it.
      Last edited by JosephHarriman; 08-03-2016, 03:31 PM.

      Comment

      Working...
      X