v1.18.x
psychobunny 10 years ago
parent af19bd8bd2
commit e90ee46cd1

@ -99,9 +99,7 @@ module.exports = function(User) {
plugins.fireHook('action:user.saveSettings', {uid: uid, settings: data});
async.waterfall([
function(next) {
db.setObject('user:' + uid + ':settings', {
var settings = {
showemail: data.showemail,
showfullname: data.showfullname,
openOutgoingLinksInNewTab: data.openOutgoingLinksInNewTab,
@ -117,9 +115,16 @@ module.exports = function(User) {
sendPostNotifications: data.sendPostNotifications,
restrictChat: data.restrictChat,
topicSearchEnabled: data.topicSearchEnabled,
bootswatchSkin: data.bootswatchSkin,
groupTitle: data.groupTitle
}, next);
};
if (data.bootswatchSkin) {
settings.bootswatchSkin = data.bootswatchSkin;
}
async.waterfall([
function(next) {
db.setObject('user:' + uid + ':settings', settings, next);
},
function(next) {
updateDigestSetting(uid, data.dailyDigestFreq, next);

Loading…
Cancel
Save