Don't break if the profile is corrupt

This commit is contained in:
Calvin Montgomery 2014-12-14 19:56:01 -06:00
parent e8a2753e19
commit 4b8681c2a4
1 changed files with 4 additions and 1 deletions

View File

@ -3,6 +3,7 @@ var $util = require("../utilities");
var bcrypt = require("bcrypt");
var db = require("../database");
var Config = require("../config");
var Logger = require("../logger");
var registrationLock = {};
var blackHole = function () { };
@ -452,7 +453,9 @@ module.exports = {
userprof.text = profile.text || "";
callback(null, userprof);
} catch (e) {
callback(e, null);
Logger.errlog.log("Corrupt profile: " + rows[0].profile +
" (user: " + name + ")");
callback(null, userprof);
}
}
});