My ASP.NET MVC web application allows administrators to change their own, or other users' usernames.
Users are logged in by calling FormsAuthentication.SetAuthCookie(userName [string], createPersistentCookie [bool])
. They are logged out by calling FormsAuthentication.SignOut()
. I understand that after updating the username I'd need to sign them out and back in again. But how do I retrieve the existing value of createPersistentCookie
? e.g. how do I retain their original 'remember me' setting when signing them back in?