Current recommended way of extending User, or achieving similar functionality?

I’ve been doing some searches on extending the User in the platform, and all of the examples are pre-6.10 and I can’t even get the examples to sync in the current Studio. (For example GitHub - aleksey-stukalov/session-attributes: The sample shows how to use session attributes in a CUBA application by @stukalov )

Is using session attributes still the recommended way of achieving this functionality? For example in the app I’m working on, we have Practitioners, who are all also login-Users, but there are also quite a few extra attributes needed, so extending User or similar functionality will be needed.

Hi @jon.craig,

Here is the updated sample based on the latest version GitHub - aleksey-stukalov/session-attributes-v7.

As for your question, I definitely would not recommend to extend the system User entity, but create a new one with a reference to the system user.

Regards,
Aleksey

Thank you for the answer and updated example, @stukalov - though, we will probably do this the “easier” way of just having a ref to the system user in another entity.

1 Like