Member Access Force Login

This page provides the history and current status of the plugins used to control access to “private” pages and posts.

Note: If you want to create a quick/temporary private page, you may edit the page /an/membership/members/nsc-private-area/private/. That page is intended as a generic private page and is already included in the functions.php file.

From 2009-2018, the Member Access Plugin was installed on NSC.CA (but not on the subwebs) to control login access on posts and pages by adding a radio-button section at the bottom of the Classic Editor page. The radio buttons could be used to change the access from public to private, forcing a WP login.

In 2018, the plugin was removed from the WordPress Plugin library. For security reasons, D. Servranckx converted it to a “private” plugin and renamed it “NSC Member Access”. He updated the plugin as needed to keep it current with PHP versions.

In 2021, a new plugin, “WP Force Login”, was installed and activated on the NSC.CA website, and the “NSC Member Access” plugin was deactivated. This new plugin is open source and very light-weight. Details are available in https://wordpress.org/plugins/wp-force-login/ .

In 2025, the WP Force Login plugin was extracted and moved to the home-grown nsc_webmaster_scripts plugin as the function nsc_force_login_bypass. The bypass list which requires member’s login looks like this as of May 2026:

/$protected = [
home_url( ‘/pr/brand/’ ),
home_url( ‘/membership/members/nsc-private-area/members-passwords-and-codes/’ ),
home_url( ‘/membership/members/nsc-private-area/upload-utilities/racing-upload-utility-v2/’ ),
home_url( ‘/membership/members/nsc-private-area/upload-utilities/general-upload-utility-v2/’ ),
home_url( ‘/membership/members/nsc-private-area/board-documents/’ ),
home_url( ‘/membership/members/nsc-private-area/am-documents/’ ),
home_url( ‘/membership/members/nsc-private-area/policies/’ ),
home_url( ‘/membership/members/nsc-private-area/mooring-allocations/’ ),
home_url( ‘/membership/members/nsc-private-area/launch-schedule/’ ),
home_url( ‘/membership/members/nsc-private-area/haulout-schedule/’ ),
home_url( ‘/membership/members/nsc-private-area/parking-permits/’ ),
home_url( ‘/membership/members/nsc-private-area/crewbank-for-members/’ ),
home_url( ‘/membership/members/nsc-private-area/last-year-crewbank-for-members/’),
home_url( ‘/membership/members/nsc-private-area/private/’),
];

To add a new URL to the list:

  1. use FTP to download the script /an/wp-content/plugins/nsc-webmaster-scripts/nsc-webmaster-scripts.php mentioned above to your own device;
  2. open the downloaded file;
  3. scroll to the function called nsc_force_login_bypass()
  4. in the list $protected, copy and paste one of the existing entry under the last entry;
  5. replace the URL in the copied entry so it matches the new post or page permalink;
  6. save the plugin script nsc-webmaster-scripts.php;
  7. upload the script nsc-webmaster-scripts.php back to the server;
  8. test the post or page you have just added.


Page Updated: 2026-05-06.
Page maintained by D. Servranckx.

Page maintained by D. Servranckx