aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Library/UserManager.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-10-19 23:04:45 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-10-19 23:04:45 -0400
commit3be4aa8dc729f5899658790f43a1d1c182e7a243 (patch)
tree0af3803924add6eaffcfd4a58a81c3385f3afc61 /MediaBrowser.Server.Implementations/Library/UserManager.cs
parent813f5d9649522f8627940e3688e49f20fbff3acd (diff)
add connect to startup wizard
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/UserManager.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Library/UserManager.cs7
1 files changed, 6 insertions, 1 deletions
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)
{