Wonder if one of the guru's could help me clarify something regarding session timeout and the current user id.
In my system, I check to see if the session has expired by using the following code:
if .NOT. eval_valid("session.xyz") then
fnRefreshSession()
end if
On each page/dialog, I do this check first. If the primary session variable is not active then I call the "fnRefreshSession()" that re-loads the session variables from the database.
That works fine....
My question is how to determine the current logged in user. My current method (v11 and before) uses the ULINK session variable. Here is how I get the info:
currentuser = session.__protected__ulink
Now my understanding that ulink is frowned upon/going away due to IIS integration. And you should use the "A5ws_GetCurrentUser" function instead. So I placed the following line in my code.
currentuser = A5ws_GetCurrentUser()
Now if I call that line when the session is still valid, I get the correct user id back.
But....if I call that line after the session has expired, I get a null value.
I thought (and it could be a wrong assumption) is that the A5ws_GetCurrentUser() works both when the session is valid and when it has expired.
If that is incorrect, and I am not supposed to use the ulink capability, how can I determine the user id of the current user after session time out?
Thanks in advance.
In my system, I check to see if the session has expired by using the following code:
if .NOT. eval_valid("session.xyz") then
fnRefreshSession()
end if
On each page/dialog, I do this check first. If the primary session variable is not active then I call the "fnRefreshSession()" that re-loads the session variables from the database.
That works fine....
My question is how to determine the current logged in user. My current method (v11 and before) uses the ULINK session variable. Here is how I get the info:
currentuser = session.__protected__ulink
Now my understanding that ulink is frowned upon/going away due to IIS integration. And you should use the "A5ws_GetCurrentUser" function instead. So I placed the following line in my code.
currentuser = A5ws_GetCurrentUser()
Now if I call that line when the session is still valid, I get the correct user id back.
But....if I call that line after the session has expired, I get a null value.
I thought (and it could be a wrong assumption) is that the A5ws_GetCurrentUser() works both when the session is valid and when it has expired.
If that is incorrect, and I am not supposed to use the ulink capability, how can I determine the user id of the current user after session time out?
Thanks in advance.
Comment