Difference between revisions of "User getCallingLoggedInUser"

From Catglobe Wiki
Jump to: navigation, search
(Return type)
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
[[Category:User_Functions]]
 
[[Category:User_Functions]]
 
= User_getCallingLoggedInUser =
 
= User_getCallingLoggedInUser =
 +
Get logged in user who calling the qas
  
 +
Example when logged in by user B, then running a qas => CallingLoggedIn user of the qas is now user B
  
 +
Or on Cati qas context, CallingLoggedIn user is the interviewer
  
 
== Syntax ==
 
== Syntax ==
Line 13: Line 16:
  
 
== Return type ==
 
== Return type ==
An array, it is the user object array, which has the same format as what generated by [[User_new]]  
+
[[User_class]]
 +
 
 +
If there is no loggedin user before, return empty
  
 
== Example ==
 
== Example ==
Line 23: Line 28:
  
 
'''Note'''
 
'''Note'''
For more detail about which user be returned on each case of answer sheet link. [[Questionnaire links#Return values for CgScript functions|Look here]]
+
 
 +
If User_getCallingLoggedInUser not run on qas context, will return empty
 +
 
 +
If run on qas context, more detail about which user be returned on each case of answer sheet link. [[Questionnaire links#Return values for CgScript functions|Look here]]
 +
 
 +
The user running function User_getCallingLoggedInUser must have at least observer access to returned user

Latest revision as of 03:10, 18 August 2022

User_getCallingLoggedInUser

Get logged in user who calling the qas

Example when logged in by user B, then running a qas => CallingLoggedIn user of the qas is now user B

Or on Cati qas context, CallingLoggedIn user is the interviewer

Syntax

User_getCallingLoggedInUser();

Arguments

None

Return type

User_class

If there is no loggedin user before, return empty

Example

User_getCallingLoggedInUser();
//{5,15645091,CAT161299666,1847,,False,0,False,{},{1,1,1,0,0,0,0,1,36},{1,1,1,0,0,0,0,1,36},en-GB,en-GB,,,,,DKK,,0,36,,,,,,,,False,False,,15645051,3d7e6d64-4d5f-4c9c-842a-d2c0fd58928f}

Note

If User_getCallingLoggedInUser not run on qas context, will return empty

If run on qas context, more detail about which user be returned on each case of answer sheet link. Look here

The user running function User_getCallingLoggedInUser must have at least observer access to returned user