I have implemented my own custom MemberhipProvider with a custom data store. There are no problems at the moment. I would like people to log in using their email address instead of their username. Since I have my own data warehouse, this is not a serious problem, I can simply transfer the email as the username for the MembershipProvider.
My question is: how to store additional user data in FormsAuthenticationTicket? I want to save a couple of things that will never change, like their UserId, First / Last Name and Country. I started learning how to create a FormsAuthenticationTicket with UserData, but quickly got confused. How to store several things in this UserData and how easy it is to read this data on every ASP.NET MVC2 page. I found many samples, none of which seemed so large in terms of MVC2. There should be an easy way to do this.
It makes no sense to read UserId, First / Last Name and Country from the database for each query, because it will never change. Also, although I want the user to log in using my email address, I would like to save their UserId in an auth cookie so that it can be used for almost every user database request, and not email ( because in all the tables user data is saved along with UserId - and not by email, because technically the email can be changed - I already realized that this happens when it comes to MembershipProvider).
What are the best methods for storing additional user data like this in ASP.NET MVC2?