From 454382cdd79e38aea7e2d6864ea4d148987f8437 Mon Sep 17 00:00:00 2001 From: thegame3202 Date: Tue, 10 Jan 2017 10:33:06 -0600 Subject: [PATCH] Plex Username Case Sensitivity Fix COLLATE NOCASE for Plex users --- Ombi.Store/Repository/PlexUserRepository.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Ombi.Store/Repository/PlexUserRepository.cs b/Ombi.Store/Repository/PlexUserRepository.cs index 6ef713014..69bb31816 100644 --- a/Ombi.Store/Repository/PlexUserRepository.cs +++ b/Ombi.Store/Repository/PlexUserRepository.cs @@ -48,21 +48,24 @@ namespace Ombi.Store.Repository public PlexUsers GetUser(string userGuid) { var sql = @"SELECT * FROM PlexUsers - WHERE PlexUserId = @UserGuid"; + WHERE PlexUserId = @UserGuid + COLLATE NOCASE"; return Db.QueryFirstOrDefault(sql, new {UserGuid = userGuid}); } public PlexUsers GetUserByUsername(string username) { var sql = @"SELECT * FROM PlexUsers - WHERE Username = @UserName"; + WHERE Username = @UserName + COLLATE NOCASE"; return Db.QueryFirstOrDefault(sql, new {UserName = username}); } public async Task GetUserAsync(string userguid) { var sql = @"SELECT * FROM PlexUsers - WHERE PlexUserId = @UserGuid"; + WHERE PlexUserId = @UserGuid + COLLATE NOCASE"; return await Db.QueryFirstOrDefaultAsync(sql, new {UserGuid = userguid}); }