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