Handle callback errors

This commit is contained in:
Mathias Schreck
2016-08-16 19:46:59 +02:00
parent d43c19c173
commit ce9ee62fa0
64 changed files with 359 additions and 23 deletions

View File

@@ -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,