mirror of
https://github.com/aunefyren/wrapperr
synced 2025-01-07 15:28:43 +00:00
Managed users fixed
This commit is contained in:
parent
80720039e8
commit
03364f040b
1 changed files with 7 additions and 2 deletions
|
@ -281,12 +281,17 @@ func ApiWrapperGetStatistics(context *gin.Context) {
|
|||
userActive = wrapperrUser.Active
|
||||
}
|
||||
|
||||
// If no username and no user_id has been declared at this point, something is wrong. Return error.
|
||||
if userName == "" || userEmail == "" || userId == 0 {
|
||||
// If no username, email and no user_id has been declared at this point, and Plex Auth is active, something is wrong. Return error.
|
||||
if (userName == "" || userEmail == "" || userId == 0) && config.PlexAuth {
|
||||
log.Println("At this point the user should have been verified, but username, email or ID is empty.")
|
||||
context.JSON(http.StatusInternalServerError, gin.H{"error": "User validation error."})
|
||||
context.Abort()
|
||||
return
|
||||
} else if userName == "" || userEmail == "" {
|
||||
log.Println("At this point the user should have been verified, but username or ID is empty.")
|
||||
context.JSON(http.StatusInternalServerError, gin.H{"error": "User validation error."})
|
||||
context.Abort()
|
||||
return
|
||||
}
|
||||
|
||||
if !userActive {
|
||||
|
|
Loading…
Reference in a new issue