Ejemplo n.º 1
0
 private LoginStatusModel(bool doLookup)
 {
     if (doLookup && HttpContext.Current != null && ApplicationContext.Current != null)
     {
         var helper = new MembershipHelper(ApplicationContext.Current, new HttpContextWrapper(HttpContext.Current));
         var model  = helper.GetCurrentLoginStatus();
         if (model != null)
         {
             Name       = model.Name;
             Username   = model.Username;
             Email      = model.Email;
             IsLoggedIn = true;
         }
     }
 }
 private LoginStatusModel(bool doLookup)
 {
     if (doLookup && UmbracoContext.Current != null)
     {
         var helper = new MembershipHelper(UmbracoContext.Current);
         var model  = helper.GetCurrentLoginStatus();
         if (model != null)
         {
             Name       = model.Name;
             Username   = model.Username;
             Email      = model.Email;
             IsLoggedIn = true;
         }
     }
 }
Ejemplo n.º 3
0
 public LoginStatusModel GetCurrentLoginStatus()
 {
     return(membershipHelper.GetCurrentLoginStatus());
 }