コード例 #1
0
ファイル: User.cs プロジェクト: sidny/d4d-studio
        public bool SetPassword(string UserName, string password)
        {
            byte[] encPassword = AccountsPrincipal.EncryptPassword(password);
            bool   result      = this.dataUser.SetPassword(UserName, encPassword);

            if (result)
            {
                User nu = new User(UserName);

                UserLogin u = new UserLogin();
                u.UserId   = nu.UserID;
                u.UserName = nu.UserName;
                u.Password = nu.NonEncryptPasswordPassword;
                u.Email    = nu.Email;
                D4DGateway.UserProvider.SetUserLogin(u);
            }

            return(result);
        }
コード例 #2
0
 public bool SetPassword(string UserName, string password)
 {
     byte[]    encPassword = AccountsPrincipal.EncryptPassword(password);
     Data.User user        = new Data.User(PubConstant.ConnectionString);
     return(user.SetPassword(UserName, encPassword));
 }
コード例 #3
0
ファイル: User.cs プロジェクト: njunet/Water125
 /// <summary>
 /// 设置用户密码
 /// </summary>
 public bool SetPassword(string UserName, string password)
 {
     byte[] cryptPassword = AccountsPrincipal.EncryptPassword(password);
     return(dataUser.SetPassword(UserName, cryptPassword));
 }