fixes build after merge
This commit is contained in:
@@ -27,7 +27,7 @@ namespace Umbraco.Core.Models
|
||||
if (user.Avatar.IsNullOrWhiteSpace())
|
||||
{
|
||||
var gravatarHash = user.Email.ToMd5();
|
||||
var gravatarUrl = "https://www.gravatar.com/avatar/" + gravatarHash + "?d=404";
|
||||
var gravatarUrl = "https://www.gravatar.com/avatar/" + gravatarHash + "?d=404";
|
||||
|
||||
//try gravatar
|
||||
var gravatarAccess = staticCache.GetCacheItem<bool>("UserAvatar" + user.Id, () =>
|
||||
@@ -61,8 +61,8 @@ namespace Umbraco.Core.Models
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//use the custom avatar
|
||||
var avatarUrl = FileSystemProviderManager.Current.MediaFileSystem.GetUrl(user.Avatar);
|
||||
return new[]
|
||||
@@ -74,7 +74,7 @@ namespace Umbraco.Core.Models
|
||||
avatarUrl + "?width=300&height=300&mode=crop"
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the culture info associated with this user, based on the language they're assigned to in the back office
|
||||
@@ -122,7 +122,7 @@ namespace Umbraco.Core.Models
|
||||
|
||||
internal static bool HasPathAccess(string path, int[] startNodeIds, int recycleBinId)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(path)) throw new ArgumentException("Value cannot be null or whitespace.", "path");
|
||||
if (string.IsNullOrWhiteSpace(path)) throw new ArgumentException("Value cannot be null or whitespace.", "path");
|
||||
|
||||
var formattedPath = "," + path + ",";
|
||||
var formattedRecycleBinId = "," + recycleBinId.ToInvariantString() + ",";
|
||||
@@ -130,14 +130,14 @@ namespace Umbraco.Core.Models
|
||||
//check for root path access
|
||||
//TODO: This logic may change
|
||||
if (startNodeIds.Length == 0 || startNodeIds.Contains(Constants.System.Root))
|
||||
return true;
|
||||
return true;
|
||||
|
||||
//only users with root access have access to the recycle bin so if the above check didn't pass than access is denied
|
||||
if (formattedPath.Contains(formattedRecycleBinId))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//check for normal paths
|
||||
foreach (var startNodeId in startNodeIds)
|
||||
{
|
||||
|
||||
@@ -85,13 +85,7 @@ namespace Umbraco.Core.Services
|
||||
/// <returns><see cref="IUser"/></returns>
|
||||
IUser IMembershipMemberService<IUser>.CreateWithIdentity(string username, string email, string passwordValue, string memberTypeAlias, bool isApproved)
|
||||
{
|
||||
var userType = GetUserTypeByAlias(memberTypeAlias);
|
||||
if (userType == null)
|
||||
{
|
||||
throw new EntityNotFoundException("The user type " + memberTypeAlias + " could not be resolved");
|
||||
}
|
||||
|
||||
return CreateUserWithIdentity(username, email, passwordValue, userType, isApproved);
|
||||
return CreateUserWithIdentity(username, email, passwordValue, isApproved);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user