Ejemplo n.º 1
0
        public WMUserIdentity(FormsIdentity identity)
        {
            WMUserIdentity cookie = AuthenticationCookieManager.GetEmbeddedDataFromAuthenticationCookie <WMUserIdentity>();

            this.UserId              = cookie.UserId;
            this.Email               = cookie.Email;
            this.AccountStatus       = cookie.AccountStatus;
            this.DateCreatedUtc      = cookie.DateCreatedUtc;
            this.LastActivityDateUtc = cookie.LastActivityDateUtc;
            this.LastActivityUpdate  = cookie.LastActivityUpdate;
            this.LastLoginDateUtc    = cookie.LastLoginDateUtc;
            this.LastRecordCheckUtc  = cookie.LastRecordCheckUtc;
            this.ProfileImageId      = cookie.ProfileImageId;
            this.TimeZoneInfoId      = cookie.TimeZoneInfoId;

            this.UserRoles = cookie.UserRoles;

            this.Name               = identity.Name;
            this.IsAuthenticated    = identity.IsAuthenticated;
            this.AuthenticationType = identity.AuthenticationType;
            this.UserName           = identity.Name;

            this.IsAnonymous = false;
        }