SimonRLM wrote: a page where all the users messages are kept
This page could be made up dynamically, fetching all messages, which were sent to the user.
Here is a little kick-starting tutorial

Suppose, you have a template messages.php and an editable type='relation' in it so that each user has some related messages (both incoming and outgoing). Now it is wise to structure the whole thing starting from messages.php:
- Code: Select all
<cms:editable type='relation' name='owner' masterpage='users.php' has='one' label='' desc='' order=''/>
So now we have each cloned 'message' page belonging to some user. We can assume, that there are going to be many messages and therefore it is good to have this relation editable placed in messages.php template, since it will be just a dropdown with one option (user), not a huge checkbox list (imagine a list of all messages)
Here is a trick to still be able to display all messages for some user in admin panel: we are going to define an editable which will just display a link and a numeric counter and place it in users.php template, so each cloned page 'user' can have a link to display all messages that belong to this user.
- Code: Select all
<cms:editable type='reverse_relation' field='owner' masterpage='messages.php' name='user_messages' anchor_text='View all messages' label='' desc='referenced to current user' />
Once you have it in backend, you'll see how beautiful it looks, not overloading browser with huge lists

- Cut-2016-08-19-0014-001.png (9.78 KiB) Viewed 2660 times
Then we can talk about filtering incoming-outgoing messages for the front-end. If each message has some editable dropdown status='incoming=100|outgoing=200', then query will be the following:
- Code: Select all
<cms:pages masterpage='messages.php' custom_field="owner=id(user-id-here) | status=100 " ><cms:show k_page_title /><hr/><cms:show message_body /></cms:pages>
Above code will list all incoming messages, ordered by publish_date. Of course we can use some different code for the same filter, with related_pages or reverse_related_pages. I suggest to keep looking at this documentation on Enhanced cms:pages tag here:
viewtopic.php?f=5&t=8581&p=16352&hilit=EnhancedBut essentially you must prepare a detailed idea of how it should work. Code comes after the plan