mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-28 17:46:16 +01:00
Handle callback errors
This commit is contained in:
@@ -122,6 +122,10 @@ SocketUser.reset.commit = function(socket, data, callback) {
|
||||
var parsedDate = now.getFullYear() + '/' + (now.getMonth()+1) + '/' + now.getDate();
|
||||
|
||||
user.getUserField(uid, 'username', function(err, username) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
emailer.send('reset_notify', uid, {
|
||||
username: username,
|
||||
date: parsedDate,
|
||||
|
||||
Reference in New Issue
Block a user