I want to write something like this:
$user = $modx->user;
$profile = $user->getOne('Profile');
//$fields = array('email', 'fullname'); // I don't want to have to guess/know the fieldnames like this
$fields = $profile->fieldNames; // this doesn't work, but I don't know what *will* work
foreach ($fields as $f) {
$modx->setPlaceholder($f, $profile->get($f));
}
It looks like $modUserProfile::fieldNames should have what I want, but maybe Iām reading the documentation wrong and/or going about it the wrong way?