We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36926
    • 701 Posts
    Hi, I’m using the following filter in the login snippet chunk.

    [[+userId:userinfo=`username`]]


    But no matter who i’m logged in as it always displays the default admin username.

    I’ve tried in all browsers, cleared cache, flushed sessions in modx. But always get the same reslut.

    I’ve actually just tried putting the above code straight into the template and I get the default admin username without even loggin in. Any ideas.

    Thanks

    Ben

      • 28215
      • 4,149 Posts
      Use this:

      To get ID: [[+modx.user.id]]
      To get Username: [[+modx.user.username]]
      
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 36926
        • 701 Posts
        Quote from: splittingred at Aug 18, 2010, 09:40 AM

        Use this:

        To get ID: [[+modx.user.id]]
        To get Username: [[+modx.user.username]]
        


        Thanks Shaun,

        So what exactly have I done above as I took that from the docs:
        http://rtfm.modx.com/display/revolution20/Input+and+Output+Filters

        I’ve noticed now in the docs the note about username can be accessed directly.

        But say I wanted to display the email, using:
        [[++userId:userinfo=`email`]]
        (in the docs this has double ++ but have tried both double and single)
        Displays the admin email.
          • 28215
          • 4,149 Posts
          Right, that’s a bug in Revo 2.0.0 that’s been fixed for 2.0.1.

          Have you looked at the Profile snippet in the Login package? It might help.
            shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
            • 36926
            • 701 Posts
            Quote from: splittingred at Aug 18, 2010, 10:23 AM

            Right, that’s a bug in Revo 2.0.0 that’s been fixed for 2.0.1.

            Have you looked at the Profile snippet in the Login package? It might help.

            Ah ok great, thanks again.

            Ben