mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-18 03:31:03 +01:00
fixed #589
This commit is contained in:
@@ -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);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user