Skip to content

Commit

Permalink
Merge pull request #910 from thegame3202/patch-3
Browse files Browse the repository at this point in the history
Plex Username Case Sensitivity Fix
  • Loading branch information
tidusjar authored Jan 11, 2017
2 parents a9ebe04 + 454382c commit 783d0c1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Ombi.Store/Repository/PlexUserRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,24 @@ public PlexUserRepository(ISqliteConfiguration config, ICacheProvider cache) : b
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});
}

Expand Down

0 comments on commit 783d0c1

Please sign in to comment.