mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-12 17:05:51 +01:00
closed #2765
This commit is contained in:
@@ -135,7 +135,19 @@ var async = require('async'),
|
|||||||
userObj.isOwner = isOwner;
|
userObj.isOwner = isOwner;
|
||||||
next(null, userObj);
|
next(null, userObj);
|
||||||
});
|
});
|
||||||
}, next);
|
}, function(err, users) {
|
||||||
|
if (err) {
|
||||||
|
return next();
|
||||||
|
}
|
||||||
|
|
||||||
|
next(null, users.sort(function(a, b) {
|
||||||
|
if (a.isOwner === b.isOwner) {
|
||||||
|
return 0;
|
||||||
|
} else {
|
||||||
|
return a.isOwner && !b.isOwner ? -1 : 1;
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
], next);
|
], next);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user