diff --git a/server/boot/user.js b/server/boot/user.js index 3f3e57b049..6c51fc74b2 100644 --- a/server/boot/user.js +++ b/server/boot/user.js @@ -322,6 +322,16 @@ module.exports = function(app) { return data; }, {}); + if (userPortfolio.isCheater) { + req.flash('errors', { + msg: dedent` + Upon review, this account has been flagged for academic + dishonesty. If you’re the owner of this account contact + team@freecodecamp.com for details. + ` + }); + } + return buildDisplayChallenges(userPortfolio.challengeMap, timezone) .map(displayChallenges => ({ ...userPortfolio, @@ -377,13 +387,6 @@ module.exports = function(app) { } if (user.isCheater) { - req.flash('errors', { - msg: dedent` - Upon review, this account has been flagged for academic - dishonesty. If you’re the owner of this account contact - team@freecodecamp.com for details. - ` - }); return res.redirect(`/${user.username}`); }