[RSS Feed/News] Edit custom user field in cron job using admin privileges?

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
Hi,

I'm creating an addon that is using a cron job to update user's custom field with individual values. I'm doing this using:

PHP:

Code:
$user->Profile->custom_fields->field_id = 'individual_value';
$user->Profile->save();

But running the cron I get this error message:

Field field_name is not editable.
Click to expand...

I think this is because the custom user field is not user editable. Options of my user custom field:

1622570442308.png

My Users shouldn't be...

Read more

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom