CustomAuthForm

Questions answered by this recipe

How to customise the authentication form (login form).How to use a custom AuthForm page.

Description

Site.AuthForm contains the default form displayed when a user tries to access a page with insufficient acces rights. It displays a login prompt and a field to enter a password, and if user authentication is enabled in config.php with

include_once("$FarmD/scripts/authuser.php");

then it displays an input box for the user name as well as for the password. Note that Site.AuthForm is not a login page, but will be used for an access attempt on any page, and if the authentication is successful, the page will be displayed.

Site.AuthForm can be edited directly and custom form elements and text can be added, or the layout and styling changed etc.

Display of the auth form can look strange on some skins, as the form is shown as page content, but some page elements may be hidden, while others may still be visible. To hide any irritating page elements, like remnants of the sidebar, and the margin left for the sidebar, one can try and eliminate sidebar and header and footer etc. by setting the styles for the containing divisions to {display:none}. Check the skin you use for the appropiate div names. For instance for the PmWiki default skin one can add to config.php: