When i update my Profile with extended user attributes, i want to grap the data from this extended user attribute instantly, however.. some cache issues or whatever are preventing me to receive this information.
example chunk:
[[UpdateProfile]]
[[+login.update_success:if=`[[+login.update_success]] `:is=`1`:then=`[[ %login.profile_updated? &namespace=`login` &topic=`updateprofile`]]`]]
<form class="form" action="[[~[[*id]]]]" method="post">
<fieldset>
[[instruments]]
</fieldset>
</form>
The instruments snippet is like this:
<?php
$path = MODX_CORE_PATH . 'components/instruments/';
$result = $modx->addPackage('instruments',$path . 'model/','users_');
$profile = $modx->user->getOne('Profile');
$extended = $profile->get('extended');
$selectedInstrument = $extended['instrument'];
if ($result) {
$instruments = $modx->getCollection('Instruments');
$output = '<select name="instrument" id="instrument"><option value="0">Les Instrument</option>';
foreach($instruments as $instrument) {
$in = $instrument->get('instru');
($in == $selectedInstrument) {
$selected = 'selected="selected"';
}
else{
$selected = "";
}
$output .= '<option '.$selected.' value="'. $instrument->get('instru') .'">'. $instrument->get('instru') .'</option>';
}
$output .= "</select>";
} else {
$output = "";
}
return $output;
$selectedInstrument is not updated instantly with the value of extended instrument..
what am i missing here?
[ed. note: stevebravo last edited this post 11 years, 9 months ago.]