corrected bug on email verification

main
Nilo Roberto C Paim 2024-05-30 17:12:13 -03:00
parent ffddfc4552
commit aefd5db1cd
1 changed files with 6 additions and 7 deletions

View File

@ -213,20 +213,21 @@ func Checkuser(c *fiber.Ctx) error {
} else {
// The user is found and it's a pay user; let's signalize this
if user.UserType == "U" {
response.Type = "U"
// If the user doesn't have a channel, it's a pay user that needs to complete the registration
if len(user.Channel) == 0 {
log.Printf("User Channel: [%s], size=%d\n", user.Channel, len(user.Channel))
response.Type = "RU"
} else {
response.Type = "U"
}
}
// The user is found and it's a social; let's signalize this
if user.UserType == "S" {
response.Type = "S"
// If the user doesn't have a channel, it's a social user that needs to complete the registration
if user.Channel == "" {
response.Type = "SR"
if len(user.Channel) == 0 {
response.Type = "RS"
} else {
response.Type = "S"
}
}
@ -237,8 +238,6 @@ func Checkuser(c *fiber.Ctx) error {
if user.Cancelled == "S" {
// User is cancelled
response.Type = "UC"
} else {
response.Type = user.UserType
}
}
}