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?
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
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.
Is your snippet called uncached?
shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect |
github |
splittingred.com
It was!
And now it’s !uncached and it’s working.
Really appreciate your support, thanks!
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’?