UserId session not available in OS 6.0

UserId session not available in OS 6.0

  
Hi

Im in the process of upgrading form Outsystems version 5.1 to version 6.0.
The Session variable UserId is not available in version 6.0.

How can i access/set this variable in version 6.0.

Regards

Arno
Hello Arno,
You do have the session variable UserId in that version and all the others.
Can you tell us the problem you are getting?
Check your User Provider and notice that the only change was in the model, ie Users instead of Enterprise Manager, and the entity Users still remains even for backward compatibility purposes.

Kind Regards,
Gonçalo M.

You can also check what I'm saying here:

Hi Concalo

I am trying to assign a value to the UserId session variable. In service Studio i get the error :

Invalid Variable

Unknown object 'Session.UserId' in variable.

Regards
Arno Coetzee wrote:
Hi Concalo

I am trying to assign a value to the UserId session variable. In service Studio i get the error :

Invalid Variable

Unknown object 'Session.UserId' in variable.

Regards
Hi again,

The issue you are talking about has a simple answer - it's just not possible.
This variable is a so called Pre-defined Session Variable, which are session variables created handled automatically by Platform Server.
This specific variable that contains the end-user id is instantiated during the login operation, whether you are using an explicit or implicit login. At logout, this session variable is assigned a Null Identifier value.
And it's also Read only as you should imagine, so you just can get it, not set it.
Hope this helps.

Regards,
Gonçalo Martins
 
First breaking change of the 6.0 Breaking Changes Document:
 
"1. Pre-defined session variables are read-only in version 6.0 because they are environment variables
and are to be set by the Agile Platform:
1. Session.UserId
2. Session. Username
3. Session.TerminalType
4. Session.ExceptionMessage
5. Session.MobilePhone
Assigns to these session variables will raise errors in version 6.0.

Fix errors by replacing session variables by local variables or, in case of the ?Session.UserId? and
?Session.Username? session variables, use the ?User_Login? system built-in function to set the
values."

Conclusion: Use the Login or User_Login actions to change the current UserId.

When you're performing an OutSystems Platform upgrade you should read through the relevant breaking changes documents. For your upgrade only the following is relevant:

http://www.outsystems.com/goto/breaking-changes-6.0
Hi Concalo

I am trying to assign a value to the UserId session variable. In service Studio i get the error :

Invalid Variable

Unknown object 'Session.UserId' in variable.

Regards
Hi Arno,

Check out this tidbit on Ricardo Silva's answer:
Conclusion: Use the Login or User_Login actions to change the current UserId.
Just replace the assignment you are currently using by one of the mentioned actions to login the user (the Session.UserId variable will be updated accordingly).

Cheers,
Davide
Davide Marquês wrote:
Hi Arno,

Check out this tidbit on Ricardo Silva's answer:
Conclusion: Use the Login or User_Login actions to change the current UserId.
Just replace the assignment you are currently using by one of the mentioned actions to login the user (the Session.UserId variable will be updated accordingly).

Cheers,
Davide
Hi,

I'm kind of new with Outsystems..Can someone tell me where to find the actions you mentioned?
Thanks in advance..


 
 
Nuno Taylor wrote:
Davide Marquês wrote:
Hi Arno,

Check out this tidbit on Ricardo Silva's answer:
Conclusion: Use the Login or User_Login actions to change the current UserId.
Just replace the assignment you are currently using by one of the mentioned actions to login the user (the Session.UserId variable will be updated accordingly).

Cheers,
Davide
Hi,

I'm kind of new with Outsystems..Can someone tell me where to find the actions you mentioned?
Thanks in advance..


 
 
Hello Nuno,

This core functions related to Users are always in the System and the Users eSpaces.
The particular functions that Davide talked about are here:




Hope this helps and good luck on your learning process.

Kind Regards,
Gonçalo Martins
 
Gonçalo Martins wrote:
Nuno Taylor wrote:
Davide Marquês wrote:
Hi Arno,

Check out this tidbit on Ricardo Silva's answer:
Conclusion: Use the Login or User_Login actions to change the current UserId.
Just replace the assignment you are currently using by one of the mentioned actions to login the user (the Session.UserId variable will be updated accordingly).

Cheers,
Davide
Hi,

I'm kind of new with Outsystems..Can someone tell me where to find the actions you mentioned?
Thanks in advance..


 
 
Hello Nuno,

This core functions related to Users are always in the System and the Users eSpaces.
The particular functions that Davide talked about are here:




Hope this helps and good luck on your learning process.

Kind Regards,
Gonçalo Martins
 
Ohh..Shame on me..They were right in front of me :S
Thank you and sorry about this silly
 
Nuno Taylor wrote:
Gonçalo Martins wrote:
Nuno Taylor wrote:
Davide Marquês wrote:
Hi Arno,

Check out this tidbit on Ricardo Silva's answer:
Conclusion: Use the Login or User_Login actions to change the current UserId.
Just replace the assignment you are currently using by one of the mentioned actions to login the user (the Session.UserId variable will be updated accordingly).

Cheers,
Davide
Hi,

I'm kind of new with Outsystems..Can someone tell me where to find the actions you mentioned?
Thanks in advance..


 
 
Hello Nuno,

This core functions related to Users are always in the System and the Users eSpaces.
The particular functions that Davide talked about are here:




Hope this helps and good luck on your learning process.

Kind Regards,
Gonçalo Martins
 
Ohh..Shame on me..They were right in front of me :S
Thank you and sorry about this silly
 
 No problem Nuno..To learn we have to ask ;)

Cheers,
Gonçalo Martins