The CreatorCon Call for Content is officially open! Get started here.

gs.getUser().getFullName() always returning 'system ' user in script actions

shravan3
Kilo Expert

I tried simple script statement in demo instance   and same thing happening in our instance also

Script action:

event: session.established

gs.log('login user name'+gs.getUser().getFullName());//this is always returning 'system'---> for any user login

Please let me know how to write a script statement to get the current user login when session is established

5 REPLIES 5

Thanks Anurag,



But here i am using events in script actions, although i am getting 'system' user


yes Shravan,



but teh problem is...event is initiated by the system, so the actor there changes and when you do gs.getUser() it refers to the system(as it is firing the event). did you understand the problem?


-Anurag

here also pass the user details in parameters only and try to access them in scripts like this



event.parm1


event.parm2




Or try to use "event.user_id"


-Anurag