completed user type
parent
ede08cee1f
commit
ea4aa84a97
|
|
@ -211,15 +211,24 @@ func Checkuser(c *fiber.Ctx) error {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
// The user is found; let's signalize this
|
||||
response.Type = "U" // At first sight it's a user
|
||||
|
||||
// TODO: Verify the user's type (Admin, User, Social, etc.)
|
||||
|
||||
// The user is found and it's a payable user; let's signalize this
|
||||
if user.UserType == "U" {
|
||||
response.Type = "U"
|
||||
// If the user doesn't have a channel, it's a social user that needs to complete the registration
|
||||
if user.Channel == "" {
|
||||
// User needs to complete the registration
|
||||
response.Type = "RU"
|
||||
} else {
|
||||
}
|
||||
}
|
||||
|
||||
// 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 user.Blocked == "S" {
|
||||
// User is blocked
|
||||
response.Type = "UB"
|
||||
|
|
@ -232,7 +241,6 @@ func Checkuser(c *fiber.Ctx) error {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Should we insert the user in the database, if it's a tester?
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue