Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Alexander Bergenstråle 2 posts 72 karma points
    Jun 13, 2016 @ 18:19
    Alexander Bergenstråle
    0

    Logging out explicit member?

    I have some code that allows members to authenticate with their Active directory account against the AD-server and then in umbraco a dummy member is created for them and this dummy member is logged in. When I try to log the member out it doesnt seem to log the dummy member out and if I do checks in the front end with

    Members.IsLoggedIn()
    

    it returns true even if I have previously done

    FormsAuthentication.SignOut();
    Members.Logout();
    

    To make matter worse if I check the values of the following statements

            Members.GetCurrentLoginStatus();
            Members.IsLoggedIn();
    

    the first one has IsLoggedIn = false and the second one returns true

    Members.GetCurrentMember()
    

    returns null and I dont really know how to handle this, and I thought maybe it has something to do with the dummy member, and I was hoping for something like "Members.LogOut(username)" but it only has one version which takes zero arguments. Is there any other way to log an explicit member out or what would otherwise cause this behaviour?

    FYI I don't know it this matters but I am using a custom membershipprovider for the AD-authentication, is this perhaps the cause? I am following this guide Active directory provider

    /Alex

  • Alexander Bergenstråle 2 posts 72 karma points
    Jun 14, 2016 @ 09:20
    Alexander Bergenstråle
    0

    The issue was caused by me not reverting a change in the IIS config file that enabled windows authentication, this caused the site to consider my user logged in.

Please Sign in or register to post replies

Write your reply to:

Draft