}
    if (isset($_POST['arp_attributes'])) {
        $arp->setAttributes($_POST['arp_attributes']);
    }
    $arp->save();
}
$subscriptions = $pm->getSubscriptions($user->getUid());
$subscriptionList = $pm->getSubscriptionList();
if (isset($_GET['page'])) {
    $page = $_GET['page'];
    $messages = $pm->getMessages($user->getUid(), $page);
} else {
    $page = 1;
    $messages = $pm->getMessages($user->getUid());
}
$messages_total = $pm->countMessages($user->getUid());
// Entity filter
$entity_filter = null;
$entity_filter_exclude = null;
if (isset($_GET['entity_filter']) && $_GET['entity_filter'] != 'nofilter') {
    $entity_filter = $_GET['entity_filter'];
}
if (isset($_GET['entity_filter_exclude']) && $_GET['entity_filter_exclude'] != 'noexclude') {
    $entity_filter_exclude = $_GET['entity_filter_exclude'];
}
// Convert legacy attribute specification to new style (< v.1.11)
$arp_attributes = array();
$old_arp_attributes = $janus_config->getValue('attributes');
foreach ($old_arp_attributes as $label => $arp_attribute) {
    if (is_array($arp_attribute)) {
        $arp_attributes[$label] = $arp_attribute;