If you use the build-in script AuthUser, PmWiki store username and password in session, that means you will be logged out when you close your browser. This module use cookie to help AuthUser have the persistent login ability.
- Unpack the distribution file into your PmWiki cookbook directory
- Add the following lines into your config.php file (Before the including of AuthUser script):
- If include authusercookie.php, Captcha do not display on lighttpd with php fastcgi. I don't know the reason, so I use such 'if...' workaround here.
- Notice you should change $AuthUserCookieKey to be special string other than the one in this example
- Modify your Site/AuthForm page to add the 'persistent' checkbox to PmWiki's login form, such as:
'''$[Password required]''' (:messages:) (:if enabled InvalidLogin:)* $[Name/password not recognized] (:if:) (:input auth_form:) (:if enabled EnableAuthUser:)$[Name]: (:input text name=authid:)\\ (:if:)$[Password]: (:input password name=authpw:)\\ (:if2 enabled AuthUserCookie:)$[Persistent]: (:input checkbox name=persistent checked=true:)\\(:if2:) (:input submit value='OK':) (:input end:)
- Log out your current account, AuthUserCookie is enabled
The following variables can be defined before userauth.php is included in config.php:
$AuthUserCookieExp - The expiration time for the cookie, in seconds. Defaults to 30 days.
- February 25, 2010 - Version 0.1
- Initial version
- PersistentLogin Login form with "Remember me/Stay signed in" option
This space is for User-contributed commentary and notes. Please include your name and a date (eg 2007-05-19) along with your comment. Optional alternative: create a new page with a name like "ThisRecipe-Talk" (e.g. PmCalendar-Talk).
See discussion at AuthUserCookie-Talk