Skip to content

Node.js based forum software built for the modern web

fix: #9081, load raw settings before merging

Barış Soner Uşaklı9da0ed400e94
diff --git a/src/api/users.js b/src/api/users.js
index 1e1f5ae40c..f72882094f 100644
--- a/src/api/users.js
+++ b/src/api/users.js
@@ -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;