mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-11-04 03:27:21 -05:00 
			
		
		
		
	check if connect user is active
This commit is contained in:
		
							parent
							
								
									b12215b3f9
								
							
						
					
					
						commit
						14bb0aa30c
					
				@ -11,6 +11,7 @@ namespace MediaBrowser.Controller.Connect
 | 
				
			|||||||
        public string Id { get; set; }
 | 
					        public string Id { get; set; }
 | 
				
			||||||
        public string Name { get; set; }
 | 
					        public string Name { get; set; }
 | 
				
			||||||
        public string Email { get; set; }
 | 
					        public string Email { get; set; }
 | 
				
			||||||
 | 
					        public bool IsActive { get; set; }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    public class ConnectUserQuery
 | 
					    public class ConnectUserQuery
 | 
				
			||||||
 | 
				
			|||||||
@ -291,6 +291,11 @@ namespace MediaBrowser.Server.Implementations.Connect
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            }, CancellationToken.None).ConfigureAwait(false);
 | 
					            }, CancellationToken.None).ConfigureAwait(false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if (!connectUser.IsActive)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                throw new ArgumentException("The Media Browser account has been disabled.");
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            var user = GetUser(userId);
 | 
					            var user = GetUser(userId);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (!string.IsNullOrWhiteSpace(user.ConnectUserId))
 | 
					            if (!string.IsNullOrWhiteSpace(user.ConnectUserId))
 | 
				
			||||||
@ -422,7 +427,8 @@ namespace MediaBrowser.Server.Implementations.Connect
 | 
				
			|||||||
                {
 | 
					                {
 | 
				
			||||||
                    Email = response.Email,
 | 
					                    Email = response.Email,
 | 
				
			||||||
                    Id = response.Id,
 | 
					                    Id = response.Id,
 | 
				
			||||||
                    Name = response.Name
 | 
					                    Name = response.Name,
 | 
				
			||||||
 | 
					                    IsActive = response.IsActive
 | 
				
			||||||
                };
 | 
					                };
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
				
			|||||||
@ -22,7 +22,7 @@ namespace MediaBrowser.Server.Implementations.Connect
 | 
				
			|||||||
        public string Name { get; set; }
 | 
					        public string Name { get; set; }
 | 
				
			||||||
        public string DisplayName { get; set; }
 | 
					        public string DisplayName { get; set; }
 | 
				
			||||||
        public string Email { get; set; }
 | 
					        public string Email { get; set; }
 | 
				
			||||||
        public string IsActive { get; set; }
 | 
					        public bool IsActive { get; set; }
 | 
				
			||||||
        public string ImageUrl { get; set; }
 | 
					        public string ImageUrl { get; set; }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user