In short, I have created a custom membership provider and a custom member. This is using the "old" .NET membership provider system. Right now I can log in successfully, and the custom member is accepted by the system as well.
Note: Only methods implemented so far in the membership provider is "ValidateUser(name, pass)" and "GetUSer(username, isonline)"
The problem is, I cant get any info from the custom member. Nothing. Everything I have tried fails. I dont think it will even matter to list what I have tried, and Googling doesnt return anything that works. Its funny how I feel like the only person in the world who has a custom member, but obviously I cant be :/
I am using Umbraco 7.5.2 if it helps.
EDIT Ok here is one of the things I have tried:
Membership.GetUser()
Apparently that doesnt work in MVC4+ and I am using MVC 5. I also tried casting it to my custom member type of course, but it's always null.
Also for current Umbraco guides they all apply to the built in member service in Umbraco 7 which is totally different than the old way of doing it. I was under the impression that once a user was logged in, the information stored in the user/member object was readily available in the front end.
EDIT 2 I have the following solution but it is far from perfect. When getting the user that is currently logging in, before I return the custom membership user, I send the entire object to the session, and get information like this:
@if (Members.IsLoggedIn())
{
Site.Extensions.TripleAMembershipUser tmpUser = new Site.Extensions.TripleAMembershipUser();
if (Session["currentUser"] != null)
{
tmpUser = (Site.Extensions.TripleAMembershipUser)Session["currentUser"];
<div><h1>@tmpUser.someCustomString</h1></div>
}
}