diff options
Diffstat (limited to 'MediaBrowser.Server.Implementations/Connect/ConnectManager.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Connect/ConnectManager.cs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs b/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs index a7f8717a7..2d39f760e 100644 --- a/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs +++ b/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs @@ -517,7 +517,7 @@ namespace MediaBrowser.Server.Implementations.Connect if (!connectUser.IsActive) { - throw new ArgumentException("The Emby account has been disabled."); + throw new ArgumentException("The Emby account is not active. Please ensure the account has been activated by following the instructions within the email confirmation."); } connectUserId = connectUser.Id; @@ -1125,7 +1125,7 @@ namespace MediaBrowser.Server.Implementations.Connect url += "?serverId=" + ConnectServerId; url += "&supporterKey=" + _securityManager.SupporterKey; url += "&userId=" + id; - + var options = new HttpRequestOptions { Url = url, @@ -1244,6 +1244,16 @@ namespace MediaBrowser.Server.Implementations.Connect .FirstOrDefault(i => string.Equals(i.ConnectUserId, connectUserId, StringComparison.OrdinalIgnoreCase)); } + public User GetUserFromExchangeToken(string token) + { + if (string.IsNullOrWhiteSpace(token)) + { + throw new ArgumentNullException("token"); + } + + return _userManager.Users.FirstOrDefault(u => string.Equals(token, u.ConnectAccessKey, StringComparison.OrdinalIgnoreCase)); + } + public bool IsAuthorizationTokenValid(string token) { if (string.IsNullOrWhiteSpace(token)) |
