# how to get user\_id if enhanced security login?

**URL:** <https://forum.servoy.com/t/how-to-get-user-id-if-enhanced-security-login/12607>\
**Category:** Classic Servoy\
**Created:** [August 7, 2010, 10:29am UTC](https://forum.servoy.com/t/how-to-get-user-id-if-enhanced-security-login/12607 "2010-08-07T10:29:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tgs](https://avatars.discourse-cdn.com/v4/letter/t/f19dbf/32.png) [@tgs](https://forum.servoy.com/u/tgs)\
**Post date:** [August 7, 2010, 10:29am UTC](https://forum.servoy.com/t/how-to-get-user-id-if-enhanced-security-login/12607/1 "2010-08-07T10:29:37Z")

</div>

I have upgraded/changed the login functionality to Servoy 5.2’s Enhanced Security. I’m using an individual loginform for inserting username and password and that is working well. But in the main solution I need the user\_id of the user who is currently logged in and in the past I got this information from the loginform.  
How do I get now the user\_id?  
The information (username) I need is only handeled in the login and authenticate solution.

Thomas

---

<div class="post-metadata">

**Author:** ![tgs](https://avatars.discourse-cdn.com/v4/letter/t/f19dbf/32.png) [@tgs](https://forum.servoy.com/u/tgs)\
**Post date:** [August 8, 2010, 9:07am UTC](https://forum.servoy.com/t/how-to-get-user-id-if-enhanced-security-login/12607/2 "2010-08-08T09:07:00Z")

</div>

Life could be so easy…

“security.getUserName” is my friend! I thought I need the UID to get the UserName.  
Next I try first and post then.

Thomas

---

<div class="post-metadata">

**Author:** ![Harjo](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/harjo/32/4873_2.png) [@Harjo](https://forum.servoy.com/u/Harjo)\
**Post date:** [August 8, 2010, 2:15pm UTC](https://forum.servoy.com/t/how-to-get-user-id-if-enhanced-security-login/12607/3 "2010-08-08T14:15:08Z")

</div>

Also all globals you set in the login solution, are available in the main solution.

Hope this helps also…

---

<div class="post-metadata">

**Author:** ![rgansevles](https://avatars.discourse-cdn.com/v4/letter/r/3d9bf3/32.png) [@rgansevles](https://forum.servoy.com/u/rgansevles)\
**Post date:** [August 16, 2010, 11:43am UTC](https://forum.servoy.com/t/how-to-get-user-id-if-enhanced-security-login/12607/4 "2010-08-16T11:43:23Z")

</div>

Thomas,

The security user id/name has not changed with the new authentication method of Servoy 5.2.  
How did you get different results?

Rob

---

<div class="post-metadata">

**Author:** ![tgs](https://avatars.discourse-cdn.com/v4/letter/t/f19dbf/32.png) [@tgs](https://forum.servoy.com/u/tgs)\
**Post date:** [August 16, 2010, 2:04pm UTC](https://forum.servoy.com/t/how-to-get-user-id-if-enhanced-security-login/12607/5 "2010-08-16T14:04:14Z")

</div>

> rgansevles:  
> The security user id/name has not changed with the new authentication method of Servoy 5.2.  
> How did you get different results?

Hi Rob,  
in Servoy 5.1.4 I got the user\_name from the login field after validation in the main solutions user\_tbl. But now this way is not more possible to go and so I had to though about an other (better ![:-)]( "Smile")) solution.
