Merge pull request #353 from eerrecart/fix-U4-4696

fix for: U4-4696. Macro personalized cache with custom membership provider not working
This commit is contained in:
Shandem
2014-04-24 11:54:54 +10:00

View File

@@ -216,8 +216,8 @@ namespace umbraco
if (CacheByPersonalization)
{
var currentMember = Member.GetCurrentMember();
id.AppendFormat("m{0}-", currentMember == null ? 0 : currentMember.Id);
int currentMember = Member.CurrentMemberId();
id.AppendFormat("m{0}-", currentMember);
}
foreach (var prop in model.Properties)
@@ -525,7 +525,7 @@ namespace umbraco
if (Model.CacheDuration > 0)
{
// do not add to cache if there's no member and it should cache by personalization
if (!Model.CacheByMember || (Model.CacheByMember && Member.GetCurrentMember() != null))
if (!Model.CacheByMember || (Model.CacheByMember && Member.IsLoggedOn()))
{
if (macroControl != null)
{