MODX 2.8.4: userinfo with extended array doesnt work?

Hi,

I have so informations for user in extended section.
for example a container “stats” with “contacts:5”

In UpdateProfile I get it via [[+stats.contacts]].

but with:

[[!+modx.user.id:userinfo=extended.stats.contacts]]

there show me nothing.

What do I make wrong?

thank you in advance.

bye
Chris

Looking at the code, it seems that it is just one level to deep to work with this output modifier.

I suspect you have to write a custom snippet (or a custom output modifier).

thank you.

I am thinking how I could cutom output modifier to extend these feature.
what is “remote_data.” ?

The easiest solution is probably to use a custom snippet to output all the user data at once.

Something like this:

Snippet “outputUserData”

<?php
$tpl = $modx->getOption('tpl', $scriptProperties, '');
$profile = $modx->user->getOne('Profile');
if ($profile){
    $userData = array_merge($modx->user->toArray(), $profile->toArray());
    return $modx->getChunk($tpl, $userData);
}

Chunk “myUserTpl”

<h2>[[+username]]</h2>
<div>
    [[+email]]<br>
    [[+extended.stats.contacts]]
</div>

Snippet Call

[[!outputUserData? &tpl=`myUserTpl`]]

The class modUser has a field remote_data. I don’t think that it is used anywhere in MODX.
Probably one of those legacy fields that had a purpose once.