# getUserName function

**URL:** <https://forum.servoy.com/t/getusername-function/2107>\
**Category:** Classic Servoy\
**Created:** [June 28, 2004, 8:58pm UTC](https://forum.servoy.com/t/getusername-function/2107 "2004-06-28T20:58:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DFehrenbach](https://avatars.discourse-cdn.com/v4/letter/d/c67d28/32.png) [@DFehrenbach](https://forum.servoy.com/u/DFehrenbach)\
**Post date:** [June 28, 2004, 8:58pm UTC](https://forum.servoy.com/t/getusername-function/2107/1 "2004-06-28T20:58:34Z")

</div>

Can the getUserName function like the getUserId where values passed to the function will yield different types of information?  
where as currently:  
getUserId() gets current user id  
getuserId(somename) gets the id of user somename.

would like to see:  
getUserName(id) yields name of userid id

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [July 5, 2004, 11:27am UTC](https://forum.servoy.com/t/getusername-function/2107/2 "2004-07-05T11:27:36Z")

</div>

in 2.1b4 you can give the getUserName a parameter user\_id.  
Then it will not return the current user but the name of the id you give

---

<div class="post-metadata">

**Author:** ![DFehrenbach](https://avatars.discourse-cdn.com/v4/letter/d/c67d28/32.png) [@DFehrenbach](https://forum.servoy.com/u/DFehrenbach)\
**Post date:** [July 5, 2004, 3:02pm UTC](https://forum.servoy.com/t/getusername-function/2107/3 "2004-07-05T15:02:29Z")

</div>

Great! Thanks!
