Show cheater message directly on user page
parent
c8a06f008b
commit
e71f33cfc0
|
@ -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}`);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue