Merge DNC into Master (#2034)

* Fix the issue where the user could not login if the plex account only allows email logins

* Fixed #2019

* Added Mass Email functionality (#2027)

* !wip

* !wip

* !qwip

* !wip

* Mass email is done

* Update README.md

* /bin/bash: wip: command not found
This commit is contained in:
Jamie 2018-03-04 20:43:51 +00:00 committed by GitHub
commit dda467828c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 404 additions and 3621 deletions

View file

@ -110,7 +110,8 @@ namespace Ombi.Core.Authentication
/// <returns></returns>
private async Task<bool> CheckPlexPasswordAsync(OmbiUser user, string password)
{
var result = await _plexApi.SignIn(new UserRequest { password = password, login = user.UserName });
var login = user.EmailLogin ? user.Email : user.UserName;
var result = await _plexApi.SignIn(new UserRequest { password = password, login = login });
if (result.user?.authentication_token != null)
{
return true;