Removed obsolete property from User
This commit is contained in:
@@ -46,21 +46,5 @@ namespace Umbraco.Cms.Core.Models.Membership
|
||||
/// A Json blob stored for recording tour data for a user
|
||||
/// </summary>
|
||||
string TourData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns an item from the user instance's cache
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="cacheKey"></param>
|
||||
/// <returns></returns>
|
||||
T FromUserCache<T>(string cacheKey) where T : class;
|
||||
|
||||
/// <summary>
|
||||
/// Puts an item in the user instance's cache
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="cacheKey"></param>
|
||||
/// <param name="vals"></param>
|
||||
void ToUserCache<T>(string cacheKey, T vals) where T : class;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -366,41 +366,6 @@ namespace Umbraco.Cms.Core.Models.Membership
|
||||
}
|
||||
}
|
||||
|
||||
public T FromUserCache<T>(string cacheKey)
|
||||
where T : class
|
||||
{
|
||||
lock (_additionalDataLock)
|
||||
{
|
||||
return AdditionalData.TryGetValue(cacheKey, out var data)
|
||||
? data as T
|
||||
: null;
|
||||
}
|
||||
}
|
||||
|
||||
public void ToUserCache<T>(string cacheKey, T vals)
|
||||
where T : class
|
||||
{
|
||||
lock (_additionalDataLock)
|
||||
{
|
||||
AdditionalData[cacheKey] = vals;
|
||||
}
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
[DoNotClone]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[Obsolete("This should not be used, it's currently used for only a single edge case - should probably be removed for netcore")]
|
||||
internal IDictionary<string, object> AdditionalData
|
||||
{
|
||||
get
|
||||
{
|
||||
lock (_additionalDataLock)
|
||||
{
|
||||
return _additionalData ?? (_additionalData = new Dictionary<string, object>());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void PerformDeepClone(object clone)
|
||||
{
|
||||
base.PerformDeepClone(clone);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Umbraco.Cms.Core.Configuration.Models;
|
||||
using Umbraco.Cms.Core.Models.Membership;
|
||||
@@ -38,13 +38,6 @@ namespace Umbraco.Cms.Infrastructure.Persistence.Factories
|
||||
user.InvitedDate = dto.InvitedDate;
|
||||
user.TourData = dto.TourData;
|
||||
|
||||
// we should never get user with ID zero from database, except
|
||||
// when upgrading from v7 - mark that user so that we do not
|
||||
// save it back to database (as that would create a *new* user)
|
||||
// see also: UserRepository.PersistNewItem
|
||||
if (dto.Id == 0)
|
||||
user.ToUserCache<string>("IS_V7_ZERO", "true");
|
||||
|
||||
// reset dirty initial properties (U4-1946)
|
||||
user.ResetDirtyProperties(false);
|
||||
|
||||
|
||||
@@ -444,17 +444,6 @@ ORDER BY colName";
|
||||
|
||||
protected override void PersistNewItem(IUser entity)
|
||||
{
|
||||
// the use may have no identity, ie ID is zero, and be v7 super
|
||||
// user - then it has been marked - and we must not persist it
|
||||
// as new, as we do not want to create a new user - instead, persist
|
||||
// it as updated
|
||||
// see also: UserFactory.BuildEntity
|
||||
if (entity.FromUserCache<string>("IS_V7_ZERO") != null)
|
||||
{
|
||||
PersistUpdatedItem(entity);
|
||||
return;
|
||||
}
|
||||
|
||||
entity.AddingEntity();
|
||||
|
||||
// ensure security stamp if missing
|
||||
|
||||
Reference in New Issue
Block a user