👔 Did not block unconfirmed user login, give them no permission instead
This commit is contained in:
@ -37,8 +37,6 @@ func doAuthenticate(c *fiber.Ctx) error {
|
||||
user, err := services.LookupAccount(data.Username)
|
||||
if err != nil {
|
||||
return fiber.NewError(fiber.StatusBadRequest, fmt.Sprintf("account was not found: %v", err.Error()))
|
||||
} else if user.ConfirmedAt == nil {
|
||||
return fiber.NewError(fiber.StatusForbidden, "account was not confirmed; check your inbox, there will be an email lead you confirm your registration")
|
||||
} else if user.SuspendedAt != nil {
|
||||
return fiber.NewError(fiber.StatusForbidden, "account was suspended")
|
||||
}
|
||||
|
Reference in New Issue
Block a user