Simon asked the question about how do we now compute the user profile URL with the new User API. Here’s my proposal:
- Create a new
xwiki-platform-user-resourcemodule to implement the following classes:
UserReferenceas input) and implements
xwiki-platform-resourcemodule). Represents a User URI (ie a User profile URI).
ResourceReferenceSerializer: takes a
UserResourceReferenceand generate an
ExtendedURL. The goal is to generate the URL for a user profile. Ideally this should extend or reuse the serializer for entity types but since there isn’t one for now, it will use FTM the XWikiServletURLFactory for its implementation.
- (Future) Add a new optional property for users. We need to define a key name for it. I propose
profileURL. If this property is defined then
ResourceReferenceSerializeruses it, otherwise it computes an XWiki User Profile URL. This allows users to have external profile URLs.
- (Future) Add a new User
ResourceReferenceHandler(i.e. introduce a
/user/URL type to point to a user profile instead of using the Entity Reference Handler).