Skip Navigation
Expand
Requiring customers to log in to end-user pages
Answer ID 881   |   Last Review Date 06/22/2022

How do I force users to log into the end-user pages?

Environment:

Oracle B2C Service, all versions
Customer Portal 3

Issue:

We want to make our contacts log in to use the end-user pages.

Resolution:

Use one of the following solutions, depending on whether you want to make contacts log in for all pages or only certain pages. For example, you might want anyone to be able to search the knowledge base but only logged-in users to use the Ask a Question page to open an incident.

Click the plus sign next to the appropriate heading below to expand that section for viewing.

Require login for all pages by using the configuration setting CP_CONTACT_LOGIN_REQUIRED

  1. Set the configuration setting CP_CONTACT_LOGIN_REQUIRED to true. This setting is interface-specific.
  2. Test the change in development mode, stage your changes, test again, and promote this change to production.

For more information on accessing the Configuration Editor and editing settings, refer to Answer ID 1960: Editing Configuration Settings.

Require login for only some pages

  1. Edit the desired page or pages. In the <rn:meta> tag at the very start, add the attribute login_required="true".
    As an example, the account overview page requires login in the reference implementation. That shows you what the login_required attribute looks like. The first line might look like this:
    <rn:meta title="#rn:msg:ACCOUNT_OVERVIEW_LBL#" template="standard.php" login_required="true" force_https="true" />
  2. Test the change in development mode, stage your changes, test again, and promote this change to production.

Notes:

For information on modifying individual pages as well as staging and deploying in the Customer Portal managed framework, consult the Customer Portal documentation for the version of Oracle B2C Service you are using. To access Oracle B2C Service manuals and documentation online, refer to the Documentation for Oracle B2C Service Products.

You should not set the login_required flag on the login_form.php page. Customers would be unable to log in.