Hello! Tell me how to get the login of an authorized user in the field?
A short example is desirable.
Thank you!
Hi Hugho,
If I got you right you want to set login of currently logged in user into some field, then see how you can achieve it below:
public class OrderBrowse extends AbstractLookup {
...
@Inject
private UserSessionSource userSessionSource;
...
@Override
public void init(Map<String, Object> params) {
...
String currentUserLogin = userSessionSource.getUserSession().getUser().getLogin();
...
}
...
}
Regards,
Aleksey