In some cases, we would like to update the user notification preferences upon the creation of this user, so that default parameters are applied.
The following snippet shows one implementation of the process that can be used to patch the user preferences : https://up1.xwikisas.com/#0LbslniIUDN9GwcRxMeSNg
This snippet does two things:
1. Enable alert notification in the user profile
2. Unwatch the main wiki
Though step 1 works, step 2 (defined in line 136 of the snippet) does not work as expected : the user continues to watch the main wiki.