I’m trying to get an analytics thing going through the plugin, and I don’t want it to render when the manager is logged in.
I’m using the event, OnWebPagePrerender
and $modx->userLoggedIn(); is not returning anything, do you know what I should use?
Is user logged in in the current context:
$isLoggedIn = $modx->user->hasSessionContext($modx->context->get('key'));
Is user logged in in the web context:
$isLoggedIn = $modx->user->hasSessionContext('web');
hmmm, it’s not working for me.
Quote from: daspoda at Oct 11, 2010, 02:14 PM
hmmm, it’s not working for me.
It works for me. Are you previewing from the Manager? That will throw things off.
You may also have to flush permissions and sessions and clear the site/browser casches after making a change.