completed user type
parent
ede08cee1f
commit
ea4aa84a97
|
|
@ -211,25 +211,33 @@ 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"
|
||||||
|
// If the user doesn't have a channel, it's a social user that needs to complete the registration
|
||||||
|
if user.Channel == "" {
|
||||||
|
response.Type = "RU"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: Verify the user's type (Admin, User, Social, etc.)
|
// 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.Channel == "" {
|
if user.Blocked == "S" {
|
||||||
// User needs to complete the registration
|
// User is blocked
|
||||||
response.Type = "RU"
|
response.Type = "UB"
|
||||||
} else {
|
} else {
|
||||||
if user.Blocked == "S" {
|
if user.Cancelled == "S" {
|
||||||
// User is blocked
|
// User is cancelled
|
||||||
response.Type = "UB"
|
response.Type = "UC"
|
||||||
} else {
|
} else {
|
||||||
if user.Cancelled == "S" {
|
response.Type = user.UserType
|
||||||
// User is cancelled
|
|
||||||
response.Type = "UC"
|
|
||||||
} else {
|
|
||||||
response.Type = user.UserType
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue