--How-to get the current username
Posted: Wed Aug 17, 2016 1:22 pm
This article is outdated - please use our new system at
https://doc.sibvisions.com
If you want to know the current user-name in your application, simply call:
- Code: Select all
getApplication().getUserName();
The method returns the same as:
- Code: Select all
getApplication().getConnection().getUserName();
If getApplication() return type is an IApplication, use this:
- Code: Select all
((ProjX)getApplication()).getUserName();
Above code is client-side code. If you need the user-name on server-side, simply call:
- Code: Select all
SessionContext.getCurrentSession().getUserName();