Skip to content

Commit

Permalink
Promote guest users once they verify email (#1032)
Browse files Browse the repository at this point in the history
Guest users who add an email address to their account and verify it get
promoted from "guest" user status to "regular" user status, so they can
now do things like becoming project managers, and so on.
  • Loading branch information
rmunn authored Aug 30, 2024
1 parent 99ff808 commit 4cb9103
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/LexBoxApi/Controllers/LoginController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ public async Task<ActionResult<LexAuthUser>> VerifyEmail(

user.Email = loggedInContext.User.Email;
user.EmailVerified = true;
// Guest ussers are promoted to "regular" users once they verify an email address
user.CreatedById = null;
user.UpdateUpdatedDate();
await lexBoxDbContext.SaveChangesAsync();
await RefreshJwt();
Expand Down

0 comments on commit 4cb9103

Please sign in to comment.