1

Users are always logged out on the front end on my Craft website. Even when logged in as admin I can access the CMS but on the front end user session always returns the following.

Craft\UserSessionService Object
(
    [_identity:Craft\UserSessionService:private] => 
    [_identityCookie:Craft\UserSessionService:private] => 
    [_userModel:Craft\UserSessionService:private] => 
    [_userRow:Craft\UserSessionService:private] => 
    [_sessionRestoredFromCookie:Craft\UserSessionService:private] => 
    [_dontExtendSession:Craft\UserSessionService:private] => 
    [allowAutoLogin] => 1
    [guestName] => Guest
    [loginUrl] => Array
        (
            [0] => /site/login
        )

    [identityCookie] => 
    [authTimeout] => 259200
    [absoluteAuthTimeout] => 
    [autoRenewCookie] => 1
    [autoUpdateFlash] => 1
    [loginRequiredAjaxResponse] => 
    [_keyPrefix:CWebUser:private] => 4e3924125ff89a395a13e8e5580209e2
    [_access:CWebUser:private] => Array
        (
        )

    [behaviors] => Array
        (
        )

    [_initialized:CApplicationComponent:private] => 1
    [_e:CComponent:private] => 
    [_m:CComponent:private] => 
)

Does anyone have any idea why this could be happening?

3
  • Is the Control Panel on a different domain/subdomain than the front-end of your site?
    – Brad Bell
    Oct 3 '17 at 18:36
  • No its the same domain for CP and front-end. Oct 3 '17 at 21:13
  • Weird... maybe something in @khalwat's answer helps?
    – Brad Bell
    Oct 4 '17 at 0:37
3

I tracked down a similar problem, and documented it here: The Case of the Missing PHP Session

I'm not sure if it'll address the issue you're having specifically, but it may give you some clue on where to look.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.