Answer the question
In order to leave comments, you need to log in
How to change the value of a profile field in modx?
You need to change the value of the photo field for the user. I'm trying to do this:
global $modx;
$profile = $user->getOne('Profile');
$profile->set('photo', $sImage);
$profile->save();
Answer the question
In order to leave comments, you need to log in
try like this:
$user = $modx->getObject('modUser',1); // 1 - user id
$profile = $user->getOne('Profile');
$profile->set('photo', $sImage);
$profile->save();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question