Tôi cần chỉnh sửa userdata trong một AuthCookie FormsAuthentication của người dùng hiện đã đăng nhập. Tôi không thấy làm thế nào để tìm hiểu xem người dùng hiện tại đã chọn một cookie liên tục ("Remember Me").Kiểm tra xem người dùng hiện đã đăng nhập có tự động liên tục không
//user is already logged in...
HttpCookie authCookie = FormsAuthentication.GetAuthCookie(username, ispersistant); //how to I determine 'ispersistant'?
FormsAuthenticationTicket ticket = FormsAuthentication.Decrypt(authCookie.Value);
FormsAuthenticationTicket newTicket = new FormsAuthenticationTicket(ticket.Version, ticket.Name, ticket.IssueDate, ticket.Expiration, ticket.IsPersistent, NEWuserdata);
authCookie.Value = FormsAuthentication.Encrypt(newTicket);
HttpContext.Current.Response.SetCookie(authCookie);
Bất kỳ ai có ý tưởng nào? Cảm ơn