mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-13 16:52:56 -07:00
Fixed #985
This commit is contained in:
parent
129269c9b5
commit
e5835bf720
1 changed files with 25 additions and 4 deletions
|
@ -98,10 +98,31 @@ namespace Ombi.Services.Notification
|
|||
return;
|
||||
}
|
||||
|
||||
var localUser =
|
||||
users.FirstOrDefault( x =>
|
||||
x.Username.Equals(user, StringComparison.CurrentCultureIgnoreCase) ||
|
||||
x.UserAlias.Equals(user, StringComparison.CurrentCultureIgnoreCase));
|
||||
UserHelperModel localUser = null;
|
||||
//users.FirstOrDefault( x =>
|
||||
// x.Username.Equals(user, StringComparison.CurrentCultureIgnoreCase) ||
|
||||
// x.UserAlias.Equals(user, StringComparison.CurrentCultureIgnoreCase));
|
||||
|
||||
foreach (var userHelperModel in users)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(userHelperModel.Username))
|
||||
{
|
||||
if (userHelperModel.Username.Equals(user, StringComparison.CurrentCultureIgnoreCase))
|
||||
{
|
||||
localUser = userHelperModel;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(userHelperModel.UserAlias))
|
||||
{
|
||||
if (userHelperModel.UserAlias.Equals(user, StringComparison.CurrentCultureIgnoreCase))
|
||||
{
|
||||
localUser = userHelperModel;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// So if the request was from an alias, then we need to use the local user (since that contains the alias).
|
||||
// If we do not have a local user, then we should be using the Plex user if that user exists.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue