MODX 2.8.4: userinfo with extended array doesnt work?


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:


there show me nothing.

What do I make wrong?

thank you in advance.


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”

$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”


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.