Exemplo n.º 1
0
Arquivo: User.cs Projeto: PTKu/TcOpen
        public User(string username, string email, string[] roles, bool canUserChangePassword, string level)
        {
            var normalizer = new UpperInvariantLookupNormalizer();

            UserName           = username;
            NormalizedUserName = normalizer.NormalizeName(UserName);
            Email                 = email;
            NormalizedEmail       = normalizer.NormalizeEmail(email);
            Roles                 = roles?.ToArray();
            Level                 = level;
            CanUserChangePassword = canUserChangePassword;
        }
Exemplo n.º 2
0
Arquivo: User.cs Projeto: PTKu/TcOpen
        public User(UserData userData)
        {
            var normalizer = new UpperInvariantLookupNormalizer();

            UserName           = userData.Username;
            NormalizedUserName = normalizer.NormalizeName(UserName);
            Email                 = userData.Email;
            NormalizedEmail       = normalizer.NormalizeEmail(Email);
            Roles                 = userData.Roles.ToArray();
            Level                 = userData.Level;
            CanUserChangePassword = userData.CanUserChangePassword;
            PasswordHash          = userData.HashedPassword;
            SecurityStamp         = userData.SecurityStamp;
            Id = userData._EntityId;
        }