Fix variable declaration and follow sonarcloud suggestions

pull/2492/head
Davide Polonio 4 years ago
parent 472efeeec4
commit 57cf19f058

@ -620,8 +620,9 @@ namespace Emby.Server.Implementations.Library
throw new ArgumentNullException(nameof(user)); throw new ArgumentNullException(nameof(user));
} }
bool hasConfiguredPassword = GetAuthenticationProvider(user).HasPassword(user); IAuthenticationProvider authenticationProvider = GetAuthenticationProvider(user);
bool hasConfiguredEasyPassword = !string.IsNullOrEmpty(GetAuthenticationProvider(user).GetEasyPasswordHash(user)); bool hasConfiguredPassword = authenticationProvider.HasPassword(user);
bool hasConfiguredEasyPassword = !string.IsNullOrEmpty(authenticationProvider.GetEasyPasswordHash(user));
bool hasPassword = user.Configuration.EnableLocalPassword && bool hasPassword = user.Configuration.EnableLocalPassword &&
!string.IsNullOrEmpty(remoteEndPoint) && !string.IsNullOrEmpty(remoteEndPoint) &&

@ -1,6 +1,4 @@
using System; using System;
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Users;
namespace MediaBrowser.Model.Dto namespace MediaBrowser.Model.Dto
{ {
@ -29,9 +27,10 @@ namespace MediaBrowser.Model.Dto
/// <summary> /// <summary>
/// Gets or sets a value indicating whether this instance has configured password. /// Gets or sets a value indicating whether this instance has configured password.
/// Note that in this case this method should not be here, but it is necessary when changeing password at the
/// first login.
/// </summary> /// </summary>
/// <value><c>true</c> if this instance has configured password; otherwise, <c>false</c>.</value> /// <value><c>true</c> if this instance has configured password; otherwise, <c>false</c>.</value>
// FIXME this shouldn't be here, but it's necessary when changing password at the first login
public bool HasConfiguredPassword { get; set; } public bool HasConfiguredPassword { get; set; }
/// <summary> /// <summary>

Loading…
Cancel
Save