Copied to clipboard

Flag this post as spam?

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


  • Fuji Kusaka 2203 posts 4220 karma points
    Sep 01, 2011 @ 07:52
    Fuji Kusaka
    0

    Authenticate Loggedin Member

    Hi all,

    Can someone help me solve out this issue? I have a member area where users can log In and get access to some private documents and nodes in the website. Everything is working perfectly but now i want to check with XSLT to display the name of the user when he is logged In.

    This is how my XSLT looks like

      <xsl:for-each select="$currentPage">      
                
          <xsl:choose>
            <xsl:when test="umbraco.library:IsLoggedOn() = true()">
             You are login as         
                <xsl:variable name="user" select="umbraco.library:GetCurrentMember()/@loginName"/>
                <xsl:value-of select="$user"/>
             
            </xsl:when>
            <xsl:otherwise>
            
            </xsl:otherwise>
          </xsl:choose>

        </xsl:for-each>


    Now whenever I logout and relogin as another user it is still display the older user name. That is lets say i logged in as [email protected] and lgout the next time I logIn again as [email protected]  i still displays [email protected].

    I even try to change the variable name to nodeName but still the same issue

     <xsl:variable name="user" select="umbraco.library:GetCurrentMember()/@nodeName"/>


    However if i use

    <asp:loginName ID="LoginName1" runat="server" /> 

     it display the write loginName but here i want to display the FirstName of the member instead not the login email addres

     

    Any suggestion?

  • Fuji Kusaka 2203 posts 4220 karma points
    Sep 02, 2011 @ 09:51
    Fuji Kusaka
    0

    Any suggestion on this please??

  • Fuji Kusaka 2203 posts 4220 karma points
    Sep 02, 2011 @ 10:04
    Fuji Kusaka
    0

    Do i need to clear the cache of the previous Logged In Member??

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Sep 02, 2011 @ 13:52
    Tom Fulton
    0

    Hi Fuji,

    It might be this bug in 4.7 where logging out doesn't *completely* log a user out.  It's fixed for 4.7.1.  Not sure if you can try the nightly build...the other workaround would be to implement your own Logout button in a C# usercontrol and add some additional code to properly logout the user (shown in the workitem comments).

    -Tom

  • Fuji Kusaka 2203 posts 4220 karma points
    Sep 02, 2011 @ 14:05
    Fuji Kusaka
    0

    Hi Tom,

    So this is basically a bug in umbraco v4.7?....I just had a look at the link you sent. So implementing my own Logout Button in a C# usercontrol will solved the logout issue?

    And this i will also be able to use GetCurrentMember that will display the right Name of the LoggedIn Member

     <xsl:variablename="user"select="umbraco.library:GetCurrentMember()/@nodeName"/>

     


  • Fuji Kusaka 2203 posts 4220 karma points
    Sep 02, 2011 @ 14:10
    Fuji Kusaka
    0

    Tom will this solved the problem?

    <system.webServer>
    <modulesrunAllManagedModulesForAllRequests="true">

     

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Sep 02, 2011 @ 14:13
    Tom Fulton
    0

    I don't think that will help. I am pretty sure this issue is from that bug, because GetCurrentMember() returns the old member id per the workitem comments.

    You can definately fix it by using your own Logout button, you just need to add a couple lines of code to fix the issue - see this post for the code added to uLogin

    Or you could upgrade to one of the nightly versions.

    Or, not sure what your time situation is, but I believe 4.7.1 should be coming out next week (according to twitter buzz)

    -Tom

  • Fuji Kusaka 2203 posts 4220 karma points
    Sep 02, 2011 @ 14:32
    Fuji Kusaka
    0

    Its a bite late for me to upgrade to version 4.7.1 since I have a website of approximately 200 pages already and contains loads of info where also using Contour.

    But when i used the

    <asp:loginStatus ID="loginStatus" runat="server"/>

    to Logout   <asp:loginStatus ID="loginStatus" runat="server"/> to display the logged In user i get the correct username.

    I think i should consider creating my own logout then cos i need to display not the username login email address but his firstName as per the members section.

     


  • Tom Fulton 2030 posts 4998 karma points c-trib
    Sep 02, 2011 @ 14:40
    Tom Fulton
    0

    You won't lose any data when you upgrade.  Not sure I would upgrade to a nightly though if you are going into production soon.  But upgrading to 4.7.1 once it comes out shouldn't be a problem.

    The logout button thing should be pretty easy, see that thread I linked for some guidance.

    -Tom

  • Fuji Kusaka 2203 posts 4220 karma points
    Sep 02, 2011 @ 14:45
    Fuji Kusaka
    0

    Thanks Tom i will surely give this a try.

  • Fuji Kusaka 2203 posts 4220 karma points
    Sep 06, 2011 @ 14:47
    Fuji Kusaka
    0

    Hey Tom we finally got it working.

    Making use of ULogin and making some changes to the code. I can now Lougout completely from the website and login as another user.

    We change the login status visibility to false and change the create a lougout Template instead to kill the login session permanently.

     

    //fuji

Please Sign in or register to post replies

Write your reply to:

Draft