Password Fork Feature

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

Password Fork

This module allows for a password fork, a tool that is used to send users to one specific page and to instruct them to use a specific password for use on that one page. Depending on the password, they will be sent to one of several nodes.

This works in a similar way as the other password form, except that there is no specific destination, and the users need to know any one of the passwords.

The feature uses a specific URL as defined below:

/protected-nodes?protected_pages=<nid1>,<nid2>,...&back=<url>

  • protected_pages=<nid1>,<nid2>,...

    This parameter is set to 2 or more node identifiers. All the nodes should be protected nodes.

    In case you defined node tokens in the different form messages defined in the global settings of the module, or have different form messages for each content type, the information from the very first node (<nid1>) will be used.

  • back=<url>

    The back parameter is used in exactly the same way as the regular password form. It is the URL used by the Cancel link and if not set but the Cancel link is always added, then the <front> page is used.

NOTE

If the destination parameter is defined, the module generates an access denied error.

Known issues

Clearing Sessions

As with single nodes, a user returning after having already entered a password that successfully unlocked a page will directly be sent to that page instead of being asked for the password.

In most cases this is great since the user doesn't need to re-enter the password over and over again. However, a user who enters a known password, then purchases a better version and tries to go back to enter the new password just purchased... will find himself on the old page without being given a chance to enter the new password.

At this time, I'm not too sure how to fix the problem, except by adding an action in the Rules module and letting you use that action whenever the user purchase a new password.

Global Password

All the nodes specified in the list of nodes to the protected_pages parameter cannot be using the global password. The test to such nodes will always fail. This cannot be fixed since if more than one such node was to be specified, only the first one could be accessed.

However, since you can enter any password in the node, you can duplicate the global password in one of the nodes.

Help improve this page

Page status: No known problems

You can: