Merge pull request #910 from thegame3202/patch-3

Plex Username Case Sensitivity Fix
pull/914/head
Jamie 8 years ago committed by GitHub
commit 783d0c1097

@ -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<PlexUsers>(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<PlexUsers>(sql, new {UserName = username});
}
public async Task<PlexUsers> GetUserAsync(string userguid)
{
var sql = @"SELECT * FROM PlexUsers
WHERE PlexUserId = @UserGuid";
WHERE PlexUserId = @UserGuid
COLLATE NOCASE";
return await Db.QueryFirstOrDefaultAsync<PlexUsers>(sql, new {UserGuid = userguid});
}

Loading…
Cancel
Save