mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-11 08:25:46 +01:00
fix: #9081, load raw settings before merging
This commit is contained in:
@@ -109,7 +109,8 @@ usersAPI.updateSettings = async function (caller, data) {
|
||||
throw new Error('[[error:no-privileges]]');
|
||||
}
|
||||
|
||||
const current = await user.getSettings(data.uid);
|
||||
// load raw settings without parsing values to booleans
|
||||
const current = await db.getObject('user:' + data.uid + ':settings');
|
||||
const payload = { ...current, ...data.settings };
|
||||
delete payload.uid;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user