Password Form

Last updated on
25 April 2019

Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites

Protected Node Password Form

Once a node is protected, a simple password form will be sent to the users who cannot bypass the password.

The password form includes a field for users to enter the node password, and an "OK" button.

When the user's browser sends a referral, the Protected Node module adds a "Cancel" link back to that referrer. The "Cancel" link can be made to always appear by selecting that option in module's global settings. If no referrer is available, the "Cancel" link returns users to the home page.

The Title, Information, Description and Password Title are all changeable in the module's global settings.

Advanced Use of the Protected Node Password Form

A link to the password page can be generated directly. Such pages use the path /protected-node. The following query strings are supported:

  • destination = <path> (required)

    The <path> to the page being unprotected. Be accurate about which page is being unlocked or the user will be asked for a password a second time (assuming the destination requires one).

    The <path> must be a web site path. A path redirect is supported, meaning site visitors can be sent through to another site if they know the password. Note that this is not completely secure.

  • protected_page = <nid> (required)

    The node identifier of the node specified in the destination <path>.

    Note that there is no verification that the <nid> and <path> match. It is the developer's responsibility to make sure they do so as to not confuse users.

  • back = <url>

    Defined referrers are saved in the "back" parameter. This <url> may point to a different web site.

    By default, a "Cancel" link does not appear if "back" is undefined.

Help improve this page

Page status: No known problems

You can: