I think I'm somehow missing a trick with this, but I can't quite put my finger on what it is, and was hoping someone could point me in the right direction.
On one of my Umbraco pages, I have a login form, which submits post data to a controller, which then logs the user in using:
After this point, "authenticated" gets set to true, and the member's "last login date" gets updated with the current timestamp.
However.. then I assumed for detecting that the user was logged in, I could use one of the following:
var test_01 = Members.GetCurrentLoginStatus();
var test_02 = Members.CurrentUserName;
var test_03 = Members.GetCurrentMember();
var test_04 = Members.GetCurrentMemberId();
var test_05 = Members.IsLoggedIn();
but every single one of these fires as if there is no logged in user.
Little confused as to where I'm going wrong, can anyone lend a hand? :)
Ever seen a case where every "logged in" property is false? :p
First time I've come across it, and I don't remember having to do any additional config / setup with the other sites I had membership on.
Just in case anyone else runs into this issue, the cause was down to an issue with my Forms Authentication setup. I had to reconfigure my settings in web.config to resolve.
Membership Provider Login Detection Issue
I think I'm somehow missing a trick with this, but I can't quite put my finger on what it is, and was hoping someone could point me in the right direction.
On one of my Umbraco pages, I have a login form, which submits post data to a controller, which then logs the user in using:
After this point, "authenticated" gets set to true, and the member's "last login date" gets updated with the current timestamp.
However.. then I assumed for detecting that the user was logged in, I could use one of the following:
but every single one of these fires as if there is no logged in user.
Little confused as to where I'm going wrong, can anyone lend a hand? :)
Try
Yeah, I'd checked the properties inside the LoginStatusModel, and unfortunately, that one is false as well :(
I've also seen cases where IsLoggedIn is true, but GetCurrentMemberId returns -1.
Ever seen a case where every "logged in" property is false? :p First time I've come across it, and I don't remember having to do any additional config / setup with the other sites I had membership on.
Anyone got any ideas? :)
Just in case anyone else runs into this issue, the cause was down to an issue with my Forms Authentication setup. I had to reconfigure my settings in web.config to resolve.
is working on a reply...