Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

can't view the website after logging out while in draft mode


Reply


2 Posts   1635 Views

Avatar
martimiz

Forum Moderator, 1132 Posts

6 November 2008 at 1:36am

Edited: 06/11/2008 1:41am

When I log out of the backend after viewing my site in draft mode, I cannot access the live website as an 'anonymous user': requesting the root of my website now redirects me to the login screen. I can force access by manually adding ?stage=Live to the url - which could be by design but then I wouldn't be so happy about it :-(

In Mozilla (XP, v3.0.3) though, even after that, just requesting the root of the site won't work. Flushing sometimes helps... The only way to avoid this is by restarting the browser or removing the PHP session ID from the cookies list.

Could this maybe be altered so that logging out automatically resets the php session id values? Please dont think I don't appreciate the good work though - because I really do :-)

Avatar
martimiz

Forum Moderator, 1132 Posts

6 November 2008 at 4:27am

Edited: 06/11/2008 4:29am

To anyone who's interested: I created a temporary (I hope) solution in the function logOut() (sapphire/security/Member.php line 174) by adding an extra line of code:

function logOut() {
   Session::clear("loggedInAs");

   # my solution: clear reference to Stage
   Session::clear("currentStage");

   self::session_regenerate_id();

   $this->RememberLoginToken = null;
   Cookie::set('alc_enc', null);
   Cookie::forceExpiry('alc_enc');

   $this->write();
}