Hi,
I've two MODX installations running on a main domain name (2.2.5PL) and one that's on an addon domain name (2.2.6PL), same webhosting. I'm using Mark Hamstra's code to detect a user is logged into the manager from the front end. The one I installed on the my site works fine. The one on the addon domain doesn't. Same code. I was trying to debug and see what user was being detected in the front end (while I'm logged into the manager). Echoing $modx->context->key returns "web", and the user as anonymous. Is this a bug? Any other methods of detection I can try?
Bump.
Anyone?
This essentially means no manager detection in my case... Really odd problem here..
-
☆ A M B ☆
- 24,524 Posts
Try putting in a debugging snippet that will output the entire SESSION with code something like this:
<?php
echo "</pre>";
print_r($_SESSION);
echo "</pre>";
return;
Hmm.. blank.. as in nothing in between the pre tags..
Well, that solved my other problem - hiding analytic tags for manager users. The other thing that's still baffling me is why I can't seem to view unpublished resources (frontend preview) as a manager... It always throws me to my homepage.
-
☆ A M B ☆
- 24,524 Posts
As far as I know, you can't use session.auto-start with MODx, because MODx starts its own session on every page request. If you are using a default PHP session, then you won't get the MODx stuff. Also, MODx stores sessions in the database instead of using the default PHP filesystem storage.
-
☆ A M B ☆
- 3,141 Posts
Are your manager and website on different (sub)domains, perhaps? Sounds like it may not be sharing the session cookie.
They're both on the same domain. I'm using an addon domain if that matters (Didn't have an issue like this with regular domain and webhosting setup.)
-
☆ A M B ☆
- 24,524 Posts
sub.domain.com does not count as the same as domain.com or www.domain.com as far as sessions go.