We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28120
    • 380 Posts
    I’m implementing reinvigorate and tracking users by name with

    var re_name_tag = "Username/Identifier";

    I’ve created a snippet

    <?php
    $output = $modx->user->get(’username’) . ’(’ . $modx->user->get(’id’) . ’)’;
    return $output;
    ?>

    and this works if I login via the manager and then view the site in another tab but still in the same session.

    However if I login using the Login package the username is ’anonymous’ and the id empty?
      • 28215
      • 4,149 Posts
      Yes, logins are context-specific, and a user that is not logged in has the ID of blank and username of ’anonymous’.
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 28120
        • 380 Posts
        I know.

        But the point I wass trying to make was that the user is logged in. When logging in the ’web’ context using the Login package it’s not showing the user session variables. Only showing if login via the manager.
          • 28215
          • 4,149 Posts
          Is your snippet called uncached?
            shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
            • 28120
            • 380 Posts
            It was!

            And now it’s !uncached and it’s working.

            Really appreciate your support, thanks!
              • 3749
              • 24,544 Posts
              Quote from: splittingred at Sep 09, 2010, 09:09 AM

              A user that is not logged in has the ID of blank and username of ’anonymous’.

              Quick note: It’s ’(anonymous)’ unless that’s changed (and please let me know if it has). And isn’t the user ID ’0’?
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting