There is no setOption() method. You have to create a modUserSetting instance with all the details:
<?php
$accept_newsletter = $modx->newObject('modUserSetting');
$accept_newsletter->set('key', 'accept_newsletter');
$accept_newsletter->set('value', '1');
$accept_newsletter->set('xtype', 'boolean');
$accept_newsletter->set('namespace', 'myNewsletterNS');
$accept_newsletter->set('area', 'MyNewsletterArea');
// use addMany() because settings are the many in a one-to-many relationship from user
$user->addMany($accept_newsletter);
$user->save();
?>
When you create a setting in the manager you can see that the valid xtype values can be textfield, textarea, or boolean. Remember that booleans are represented by a string ’1’ or string ’0’, since all values for settings are actually stored in a text data field.
Please note however, that although user settings are actually available from $modx->getOption(), this is loaded via a special cache and session mechanism related to MODx Contexts and adding this data object will not make the setting available via $modx->getOption() until the user session is updated.
Settings may not be what you want here. A new feature is being added (it already exists in the table and API in RC2) that will allow you to store and access unlimited extended user profile attributes as part of the core modUserProfile. I’ll have more information soon, but it would work like this to add a new attribute:
<?php
// get the array of extended user profile attributes
$extended = $profile->get('extended');
// add/replace the value of the element for key `accept_newsletter`
$extended['accept_newsletter'] => true;
$profile->set('extended', $extended);
$profile->save();
?>
The PHP array you set() in the extended field is encoded to a JSON object before being stored in the database, and a fulltext index is applied to the field so it should be searchable in various ways if necessary. The array can be as simple or complex as you want (though don’t nest too deeply or managing the data will become messy), and a tab on the user management interface will be available in the core manager distribution for this data before 2.0 goes GA.