From 3be4aa8dc729f5899658790f43a1d1c182e7a243 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 19 Oct 2014 23:04:45 -0400 Subject: add connect to startup wizard --- MediaBrowser.Server.Implementations/Library/UserManager.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'MediaBrowser.Server.Implementations/Library/UserManager.cs') diff --git a/MediaBrowser.Server.Implementations/Library/UserManager.cs b/MediaBrowser.Server.Implementations/Library/UserManager.cs index 1b3f64984..86c908d05 100644 --- a/MediaBrowser.Server.Implementations/Library/UserManager.cs +++ b/MediaBrowser.Server.Implementations/Library/UserManager.cs @@ -159,7 +159,12 @@ namespace MediaBrowser.Server.Implementations.Library throw new ArgumentNullException("username"); } - var user = Users.First(i => string.Equals(username, i.Name, StringComparison.OrdinalIgnoreCase)); + var user = Users.FirstOrDefault(i => string.Equals(username, i.Name, StringComparison.OrdinalIgnoreCase)); + + if (user == null) + { + throw new AuthenticationException("Invalid username or password entered."); + } if (user.Configuration.IsDisabled) { -- cgit v1.2.3