mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-23 17:00:24 +01:00
closes #5234
This commit is contained in:
@@ -63,7 +63,7 @@ editController.email = function (req, res, next) {
|
||||
|
||||
function renderRoute(name, req, res, next) {
|
||||
getUserData(req, next, function (err, userData) {
|
||||
if (err) {
|
||||
if (err || !userData) {
|
||||
return next(err);
|
||||
}
|
||||
if ((name === 'username' && userData['username:disableEdit']) || (name === 'email' && userData['email:disableEdit'])) {
|
||||
@@ -94,7 +94,7 @@ function getUserData(req, next, callback) {
|
||||
function (data, next) {
|
||||
userData = data;
|
||||
if (!userData) {
|
||||
return next();
|
||||
return callback();
|
||||
}
|
||||
db.getObjectField('user:' + userData.uid, 'password', next);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user