v1.18.x
Julian Lam 12 years ago
parent 5621fb8622
commit cc242ca667

@ -10,8 +10,8 @@ define(['forum/accountheader'], function(header) {
showemail: $('#showemailCheckBox').is(':checked') ? 1 : 0 showemail: $('#showemailCheckBox').is(':checked') ? 1 : 0
}; };
socket.emit('api:user.saveSettings', settings, function(success) { socket.emit('api:user.saveSettings', settings, function(err) {
if (success) { if (!err) {
app.alertSuccess('Settings saved!'); app.alertSuccess('Settings saved!');
} else { } else {
app.alertError('There was an error saving settings!'); app.alertError('There was an error saving settings!');

@ -340,8 +340,9 @@ module.exports.init = function(io) {
if (uid) { if (uid) {
user.setUserFields(uid, { user.setUserFields(uid, {
showemail: data.showemail showemail: data.showemail
}, function(err) {
callback(err ? err.message : null);
}); });
callback(true);
} }
}); });

Loading…
Cancel
Save