[wp-hackers] Password protected post - how to require password everytime

Otto otto at ottodestruct.com
Fri Nov 19 17:27:44 UTC 2010


Instead of using "time() - 31536000", try changing that to 0 (zero).

A zero for the time parameter will make the cookie into a session
cookie, which means that it will last only as long as the browser is
open. When the browser is closed, the cookie goes away.

-Otto



2010/11/19 Pavel Hejn <pavelevap at post.cz>:
> Thank you for your plugin hint, but this solution requires users action (they have to click "Logout" and they can forget).
> The main purpose was disabling access (for example for public places).
> Code from Andrew Nacin was great and simple solution, but it is not possible to leave comments now...
> Maybe is there any simple hack for this?
>
> Thank you...
>
> Pavel
>
>
>> ------------ Původní zpráva ------------
>> Od: John Blackbourn <johnbillion+wp at gmail.com>
>> Předmět: Re: [wp-hackers] Password protected post - how to require password
>> everytime
>> Datum: 19.11.2010 10:09:14
>> ----------------------------------------
>> 2010/11/19 Pavel Hejn <pavelevap at post.cz>:
>> > Hello,
>> >
>> > this solution has one big problem - it is not possible to add comments to this
>> post...
>> > We deleted cookie, so we can not add comment to password protected post :-(
>> > Anybody has any idea? Is there any simple possible solution?
>> > Thank you very much for your help...
>> >
>> > Pavel
>>
>> You could try a plugin such as Logout of Password Protected Posts [1]
>> and remind your users to log out if they're on a shared/public
>> computer.
>>
>> You could combine that with a shorter expiration time for the cookie
>> (maybe an hour?).
>>
>> [1] http://lud.icro.us/wordpress-plugin-logout-password-protected-posts/
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
>>
>>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list