mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
Fixed an issue where some users couldn't update thier plex admin account. looks like their user id changed in plex. We now update the main user.
#1249
This commit is contained in:
parent
4836ab7e6c
commit
dffc0f3d75
2 changed files with 14 additions and 2 deletions
|
@ -190,10 +190,22 @@ namespace Ombi.Services.Jobs
|
|||
LoginId = Guid.NewGuid().ToString()
|
||||
};
|
||||
|
||||
a.Permissions += (int)Permissions.Administrator; // Make admin
|
||||
a.Permissions += (int) Permissions.Administrator; // Make admin
|
||||
|
||||
Repo.Insert(a);
|
||||
}
|
||||
else
|
||||
{
|
||||
// does the account need updating?
|
||||
if (dbMainAcc != null)
|
||||
{
|
||||
dbMainAcc.PlexUserId = mainPlexAccount.Id;
|
||||
dbMainAcc.EmailAddress = mainPlexAccount.Email;
|
||||
dbMainAcc.Username = mainPlexAccount.Username;
|
||||
|
||||
Repo.Update(dbMainAcc);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue