User Self-Registration

User self-registration allows end-users to create their own accounts for login to your application. You can require them to answer a CAPTCHA to prevent automated processes from creating accounts and can also require users to confirm their email address by visiting a link sent to the email address they provide during registration.

Requirements

  • Currently, user self-registration is only supported for LDAP and SQL-based directories.
  • For LDAP-based directories, the “Generic User” account on the “LDAP Basic” tab must have authority to create Users in the target directory.
  • CAPTCHA functionality requires a reCAPTCHA API key from Google
  • Microsoft SQL Server 2005 or later is required for the email confirmation feature. The user’s registration data is temporarily stored there until confirmation or it expires.

Follow the steps below to enable and configure user self-registration:

  1. If using CAPTCHA:
    1. Register for a reCAPTCHA API key
    2. Enter the Public and Private keys in the Services -> CAPTCHA tab of the PG Bootstrap Configuration using PG_Config.exe
  2. If using email confirmation:
    1. Copy PortalGuard’s SQL scripts to the SQL server machine. The script files are found in the PG kit under the folder:

PortalGuard\For IIS\_Optional\SQL scripts

    1. On the SQL server, run the PG scripts in the following order:

i. create_database.sql

ii. create_tables.sql

iii. create_storedprocs.sql

    1. On the PG server, create a new ODBC connection to the SQL server from Start -> Administrative Tools -> Data Sources (ODBC). This must be a System DSN.
    2. In PG_Config.exe, set the SQL connectivity settings in the Bootstrap under the User Data -> SQL tab:

    1. Also in the Bootstrap, configure email/SMTP server settings on the Services -> Email tab.
    2. In IIS Manager, right-click the root of the PortalGuard website and choose “Add Virtual Directory…”

    1. Set the alias as “reg” and the physical path as “C:\inetpub\PortalGuard\_layouts\PG”

  1. In PG_Config.exe, edit the User Repository configuration and enable Self-Registration on the Self Registration tab.
  2. On the Basics sub-tab, either the Username or Email Address should be checked for uniqueness (or both).
  3. On the User Creation sub-tab, set the Target Container in LDAP and click the “Set Defaults” button to establish the default field mappings. This controls how the HTML fields will be set in the user’s account.
  4. If using email confirmation, the email template and the lifespan of the staged registration data can be customized on the Email Confirmation sub-tab.
  5. Save the changes to the User Repository configuration.
  6. Optionally, you can edit “C:\InetPub\PortalGuard\_layouts\PG\register.aspx” to customize the look and feel of the registration form. You can also add additional fields but renaming any existing HTML input fields is not supported.
  7. Optionally, you can edit the ProcessRequest function in “C:\InetPub\PortalGuard\App_Code\register.ashx.cs” to do any custom work when a user is successfully registered.

You can now direct users to the following page to initiate the registration process:

http://<your.pg.server>/_layouts/PG/register.aspx