U4-10274 Umbraco.MemberHasAccess isn't cached
This commit is contained in:
@@ -23,9 +23,9 @@ namespace Umbraco.Web.Models
|
||||
|
||||
private LoginStatusModel(bool doLookup)
|
||||
{
|
||||
if (doLookup && HttpContext.Current != null && ApplicationContext.Current != null)
|
||||
if (doLookup && UmbracoContext.Current != null)
|
||||
{
|
||||
var helper = new MembershipHelper(ApplicationContext.Current, new HttpContextWrapper(HttpContext.Current));
|
||||
var helper = new MembershipHelper(UmbracoContext.Current);
|
||||
var model = helper.GetCurrentLoginStatus();
|
||||
if (model != null)
|
||||
{
|
||||
|
||||
@@ -32,9 +32,9 @@ namespace Umbraco.Web.Models
|
||||
private ProfileModel(bool doLookup)
|
||||
{
|
||||
MemberProperties = new List<UmbracoProperty>();
|
||||
if (doLookup)
|
||||
if (doLookup && UmbracoContext.Current != null)
|
||||
{
|
||||
var helper = new MembershipHelper(ApplicationContext.Current, new HttpContextWrapper(HttpContext.Current));
|
||||
var helper = new MembershipHelper(UmbracoContext.Current);
|
||||
var model = helper.GetCurrentMemberProfileModel();
|
||||
MemberProperties = model.MemberProperties;
|
||||
}
|
||||
|
||||
@@ -32,9 +32,9 @@ namespace Umbraco.Web.Models
|
||||
MemberProperties = new List<UmbracoProperty>();
|
||||
LoginOnSuccess = true;
|
||||
CreatePersistentLoginCookie = true;
|
||||
if (doLookup && HttpContext.Current != null && ApplicationContext.Current != null)
|
||||
if (doLookup && UmbracoContext.Current != null)
|
||||
{
|
||||
var helper = new MembershipHelper(ApplicationContext.Current, new HttpContextWrapper(HttpContext.Current));
|
||||
var helper = new MembershipHelper(UmbracoContext.Current);
|
||||
var model = helper.CreateRegistrationModel(MemberTypeAlias);
|
||||
MemberProperties = model.MemberProperties;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user