[ClassExtender] Should I extend users with Bob Ray's extra or simply use native modx user settings

Hello everyone and Happy New Year!

My question is: are there advantages to use ClassExtender over using the native modx user settings that can override the system settings?

I am currently developping an e-learning website.

The users can fill all the modx user fields (photo, phone, city, country…). and also some other custom settings (difficulty, speed…)

I chose not to store the custom settings in the modx extended fields because it’s slow and not easily feasible to sort and search.

I am considering about using the ClassExtender extra to store all the custom fields, but I maybe it would be easier to simply use the “Settings” tab in the user page in the manager.

Would you recommend the extra or the user settings?

Thank you all and stay safe :slight_smile:

I believe the user settings are even a bigger hassle than the extended fields.

It’s probably simpler to use ClassExtender.

Thank you @halftrainedharry

It turns out there’s no hassle dealing with caching or setting up new extra redirections to get the updated value of the user setting in the current session, as long as i force reload the settings and as long as it’s called with “getOption”.

$modx->getUser('', true);// force reload user settings
echo $modx->getOption( 'my_setting', null, '', true );// this shows the updated value

However I have not found out yet how to make it work with the template tags ( example: [[!++my_setting]] will require one more click on “refresh” to get the latest updated value)

Similar issue:

Thank you once again for your help