Exemple #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Principal"/> class.
        /// </summary>
        public ReferralSystemPrincipal(string username, FormsAuthenticationTicket authTicket)
        {
            this.Username = username;
            UserAuthService userAuthService = DependencyResolver.Current.GetService <UserAuthService>();

            UserViewModel user = userAuthService.GetUser(username);

            this.Identity   = new FormsIdentity(authTicket);
            this.UserID     = user.UserID;
            this.EmployeeID = user.EmployeeID;
            this.RoleType   = user.Type;
        }