Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-10-18 13:41:23

alanfluff
Member
From: Ottawa, Canada
Registered: 2008-09-15
Posts: 222
Website

Logout of a <txp:password_protect /> session

Hello :)

Is there a way to logout after a successful login with <txp:password_protect />?

I know that I can logout by doing stuff like emptying cache and restarting a browser (or similar), but I am looking form something user-friendly, that I can present as a ‘Logout’ link.

I’ve searched and can’t find anything other than refs to ign_password_protect which appears to not be a robust solution for TXP 4.2.0 — pre-apologies if I’m wrong to conclude that.

Any suggestions on how I can provide an easy reliable ‘logout’ would be most appreciated. I wouldn’t mind switching to using ign_password_protect is that’s the received wisdom — thanks LOTS in advance for any comments!

Cheers, -Alan


At LAST I’ve cheerfully donated to the core devs at #TXP. I only wish I were able to give more. Thanks to the devs and ALL fellow TXPers. -A

Offline

#2 2010-10-25 08:35:54

jacknails
Member
From: Israel
Registered: 2009-12-12
Posts: 17
Website

Re: Logout of a <txp:password_protect /> session

Hi there!

I’ve managed to get ign_password_protect to work and I recommend it.

I think adding this to the login form helped:
<input type="hidden" name="stay" value="1">

To create a logout link, try this:
http://www.site.com/protected-section/?logout=1

Good luck!

Offline

#3 2010-10-25 12:38:52

alanfluff
Member
From: Ottawa, Canada
Registered: 2008-09-15
Posts: 222
Website

Re: Logout of a <txp:password_protect /> session

Hi Daniel,

Thanks — I ended up doing the same, trying ign_password_protect, and I had no problems getting it to work either.

But thanks for the help all the same :)

Cheers, -Alan


At LAST I’ve cheerfully donated to the core devs at #TXP. I only wish I were able to give more. Thanks to the devs and ALL fellow TXPers. -A

Offline

Board footer

Powered by FluxBB