Hi All,
Does anyone have a code example for capturing user, user_audit, etc. after logging in on the web? Our audit fields return DFTUSER even though our user profile field populates with the logged in user. My understanding is it has to be mapped to a persistentstring, but I can't quite figure it out.
Thank you!
User profile when logging in VLF1
-
René Houba
- Posts: 220
- Joined: Thu Nov 26, 2015 7:03 am
Re: User profile when logging in VLF1
Hi,
Is this WAM's or VL Web?
Is this WAM's or VL Web?
Re: User profile when logging in VLF1
Have you check the supplied reusable part VLFDEMO_ ? That one is a server module for VLF ONE that can do the setting of the USER_AUDIT with the user name sent to it in the initialize section:
Code: Select all
* For example, you might consider altering LANSA’s audit user here using the
* SET_SESSION_VALUE built-in function:
* Use Builtin(SET_SESSION_VALUE) With_Args(USER_AUDIT <<user name>>)
* https://%lansadocs%/lansa015/index.htm#lansa/ladtgub4_user_variables.htm?Highlight=USER_AUDITRe: User profile when logging in VLF1
Hi Dino,
I have tried that and the user_audit field still comes back blank.
I have tried that and the user_audit field still comes back blank.
Re: User profile when logging in VLF1
I remember I deal with this before.... found an old email:
All the steps were:
1) I took the common activity to create a framework access validator, which was named TEST06_LogonValidation, and used the user there to assign it to a Persistent String:
#Persistent_ApplicationString1 := #UserProfiletoCheck
2) In TEST06_ServerSystemManager, MthRoutine InitializeServiceRoutine, I uncommented the SET_SESSION_VALUE and used the same persistent string there:
Use Builtin(SET_SESSION_VALUE) With_Args(USER_AUDIT #PersistentString1.AsNativeString)
3) I noticed that the server module generated by the common activities don’t have the persist command at the beginning. Need to have this, so I added it.
Persist Fields(#Persistent_ApplicationString1 #Persistent_ApplicationString2 #Persistent_ApplicationString3 #Persistent_ApplicationString4 #Persistent_ApplicationString5)
Please check that.
All the steps were:
1) I took the common activity to create a framework access validator, which was named TEST06_LogonValidation, and used the user there to assign it to a Persistent String:
#Persistent_ApplicationString1 := #UserProfiletoCheck
2) In TEST06_ServerSystemManager, MthRoutine InitializeServiceRoutine, I uncommented the SET_SESSION_VALUE and used the same persistent string there:
Use Builtin(SET_SESSION_VALUE) With_Args(USER_AUDIT #PersistentString1.AsNativeString)
3) I noticed that the server module generated by the common activities don’t have the persist command at the beginning. Need to have this, so I added it.
Persist Fields(#Persistent_ApplicationString1 #Persistent_ApplicationString2 #Persistent_ApplicationString3 #Persistent_ApplicationString4 #Persistent_ApplicationString5)
Please check that.
Re: User profile when logging in VLF1
Thanks Dino. That was it. Works as intended now.