Develop "My Page" with user data edit on Enonic XP

We are developing a “my page” solution were we want the user to update some data about them self. The users will be imported from an external resource and imported to user manager. The profile will consist of data from the external system and Enonic XP.

Some questions.

  1. How can I access the current user profile in user management from a part controller ?
  2. Is it possible to add more fields to a user in user management or should I save the extended data in an seperate content type for the user ?

Runar - Users Are primarily “auth objects” not profiles, so you should consider creating profiles as content instead.

There Will likely be options for custom fields on Users in 6.0

But is it possible to retrieve the data for the user who created a content? Something along the lines of “portal.getUser({’_key=user:system:su’})”?

In the content JSON I only get the user ID (user:system:su). I would like to be able to retrieve the name of the user, and possibly the email, both of which are already existing values.

The use case is to add a byline to an article, with name and link to send email, with the creator of the article. I could of course create a content element for the user and then add that, or possibly just add a relationship-type for the user type, but it would be nice if this could be automated.

Hi Vegard

Unfortunately we don’t have such a “portal.getUser” function yet. It will probably come in 6.1, and return a minimum number of fields (displayName, email?).
So you should still use content for a full profile as Thomas said.

It might be possible to create a similar function yourself in a library, with some Java code, but we don’t have that documented yet.