New User API

Last modified by Vincent Massol on 2021/06/14

We now have a new User API (see the History section to understand the various ways to get properties for a User and which APIs to use and which ones shouldn't be used).

Example from Java:

@Inject
private UserResolver<UserReference> userResolver;
...
User currentUser = userResolver.resolve(UserReference.CURRENT_USER_REFERENCE);
boolean isActive = currentUser.isActive()

Example from Velocity:

$services.user.resolveUser('').isActive()
Tags:
   

Get Connected