Show cheater message directly on user page
This commit is contained in:
@ -322,6 +322,16 @@ module.exports = function(app) {
|
|||||||
return data;
|
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)
|
return buildDisplayChallenges(userPortfolio.challengeMap, timezone)
|
||||||
.map(displayChallenges => ({
|
.map(displayChallenges => ({
|
||||||
...userPortfolio,
|
...userPortfolio,
|
||||||
@ -377,13 +387,6 @@ module.exports = function(app) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (user.isCheater) {
|
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}`);
|
return res.redirect(`/${user.username}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user