How to modify UserIndicator

Dear Cuba Team,

How to modify UserIndicator field ? for example something like this :
UserName - User.Posistion.Title -> Irfani - Software Engineer

Hi,

Currently you can only change global instance name of User if you extend this entity and override getCaption() method. I think we should implement something like Formatter for UserIndicator. I’ve created the ticket in our bug tracker, see the link on the right.

As workaround you can replace UserIndicator with a simple Label and set formatted user name to it. You can obtain currently logged in user using UserSessionSource bean.


@Inject
private UserSessionSource userSessionSource;
@Inject
private Label userLabel;
...
User loggedInUser = userSessionSource.getUserSession().getUser();
userLabel.setValue(loggedInUser.getEmail());

Hi Yuriy,

That formatter property sounds great.
I prefer to use UserIndicator field, since it also handle user substitution.

Thanks.

Hi,
The User name formatter feature is implemented in the platform 6.6.0.

:ticket: See the following issue in our bug tracker:

https://youtrack.cuba-platform.com/issue/PL-8679