Skip to content

Commit

Permalink
make new users with admin, owner, or mentor role to be invisible by d…
Browse files Browse the repository at this point in the history
…efault
  • Loading branch information
wang9hu committed Feb 29, 2024
1 parent 8a9b19c commit 84cd2c9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/controllers/userProfileController.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ const userProfileController = function (UserProfile) {
up.bioPosted = req.body.bioPosted || 'default';
up.isFirstTimelog = true;
up.actualEmail = req.body.actualEmail;
up.isVisible = !['Administrator', 'Mentor', 'Owner'].includes(req.body.role);

up.save()
.then(() => {
Expand Down

0 comments on commit 84cd2c9

Please sign in to comment.