Drupal – Registration



Contact your Janrain Technical Lead to obtain the following Janrain components:

Installation / Configuration

1. Install the Janrain Registration Drupal module

  1. Download the Drupal Registration module from http://drupal.org/project/janrain_capture.
  2. Unzip the file and copy the janrain_capture folder into the drupal-7.x/sites/all/modules folder or use the Modules administrative menu item to install the module.

2. Copy the HTML, JavaScript, and CSS screens files to the correct location

Copy the Drupal screens files package supplied by your Janrain Technical Lead or Deployment Specialist to the drupal-7.x/sites/all/themes/ folder.

Your folder should be named janrain-capture-screens and include five .html files, five .js files, and a folder named stylesheets. Do not rename any of the .html or .js files. If you are using a flow other than the standard flow, you need to modify the value in janrain.settings.capture.flowName at the beginning of each of the .html files.

The module is bundled with two stylesheets that will load if a mobile device is detected, and you may modify them:

You may also add janrain_ie.css to load conditional Internet Explorer (IE) styles if IE is detected as the browser.

3. Download, install, and enable the Entity module

If not already installed, download the Entity module from http://drupal.org/project/entity, install it, and enable it.

4. Activate the Janrain and Entity API modules

Activate the following modules and click Save Configuration:

If you are using PoC, have a single site, or are self-hosted, you probably do not want to enable the Janrain Capture Screens module because the screens folder can now point to a remote server.

Activate the Janrain Capture Screens module if you are doing an advanced Acquia deployment, or if you explicitly want to use the file uploader (see the Configure the Screens Files Location step).

When activating the Janrain module, you may also be prompted to enable dependencies (such as EntityAPI).

5. Configure the Capture version

  1. Log in as the site administrator.
  2. Click Configuration.
  3. Click Janrain Capture.
  4. Select the Capture version. You will always want to choose Capture if you are a new customer.
  5. Click Save configuration.

Capture—JavaScript implementation
Legacy Capture—iFrame implementation

6. Configure the screens files location (OPTIONAL)

By default, the screens files location is set to drupal-7.x/sites/all/themes/janrain-capture-screens. The files are copied to this location in the previous Install the Janrain Registration Drupal Module step. However, the screens files location can be changed to any accessible location.

The Janrain Capture Screens module can be enabled, which restricts you to uploading one file at a time to a fixed file system location. Most users probably do not want to do this (see the previous Activate the Janrain and Entity API Modules step for more details).

7. Configure Janrain settings

a. Configure the application settings

Your Janrain Technical Lead will provide these settings:

Application Setting Description
Application ID Capture Application ID (located in your Janrain Dashboard).
Client ID Capture Client ID (located in your Janrain Dashboard). This should be a login client and link to relevant documents on the different permission sets for API clients.
Client Secret Capture Client Secret (located in your Janrain Dashboard).
Load.js file URL Leave the box selected as Use default load.js URL.
Capture URL Capture Application URL (provided by your Janrain Technical Lead).
Engage URL Engage Application URL (provided by your Janrain Technical Lead).

b. Configure the UI settings

UI Setting Description
Enable Capture Profiles Enable or disable the overriding of standard Drupal profiles.

c. Configure the Federate settings (OPTIONAL)

Federate Setting Description
Enable SSO Enable or disable SSO for Capture 2.0 (JavaScript).
Single sign on domain The domain to use for Single Sign-on.

d. Configure the Backplane settings (OPTIONAL)

Backplane Setting Description
Enable Backplane Enable or disable Backplane support for Capture 2.0 (JavaScript).
Backplane Version 1.2 or 2.0.
Backplane server base URL Base URL of Backplane server.
Backplane bus name Name of the Backplane bus.

e. Configure the field settings

Field Setting Description
Don’t store user email addresses in the Drupal database Enable this setting to prevent the module from storing user email addresses in the Drupal database.
Require email verification Prompts users who have not verified their email address to do so before completing authentication.
Match users by email address Map Drupal user and Capture accounts if both share the same email address.
Map profile pic Automatically map the Capture profile photo to the Drupal user profile picture.
Preferred photo variant Select the photo variant to use from the Capture profile.

f. Configure the Social Share v2 settings (OPTIONAL)

Social Share Setting Description
Enable Social Share Enable Janrain Social Sharing v2 for the Drupal site.

g. Configure the Social Sharing settings for content (OPTIONAL)

8. Configure the Social Sharing settings for comments (OPTIONAL)

9. Configure field mapping (OPTIONAL)

Tab Description
Manage Fields This tab defines which fields from the Janrain customer profile database (Capture) are available for mapping to Drupal database fields.

To add a new mapping from Capture to Drupal, enter the Janrain field name in the PATH field and enter a name in the TITLE field to be used in the Field Mapping tab.

When mapping plurals, the value path convention should be used—replace all symbols with a period (“.”). For example: profiles#1.username is formatted as profiles.1.username.

Field Mapping This tab enables you to map available Janrain fields (identified on the Manage Fields tab) to available Drupal fields. By default, the module maps the Janrain UUID to the Drupal username. Here you can change this mapping to displayName or some other Janrain attribute.

10. Associate the Drupal admin account with a Janrain account

The Enforce the use of Janrain Capture setting removes the Drupal user login capability from the website and replaces it with Janrain Registration. This forces the user login block to be overridden by the Janrain Capture user login block, so you must have User Login enabled on your site in order for this to work. Prior to enabling this setting, make sure that you have associated at least one administrative account with a Janrain (Capture) account. To associate the currently-logged-in administrator with a Capture account, follow these steps:

  1. Select the Enforce the use of Janrain Capture box and save the settings. Unless you have already given an imported Capture account Drupal administrative privileges, do not sign out as the administrator.
  2. While logged in as the site administrator, open an incognito or second browser window to establish a new session and sign in using Janrain with an account that matches the administrator email account.
  3. You will be prompted to sign in with your Drupal administrative credentials. Doing so links the Capture account with the Drupal administrative account and enables access to the Drupal administrative console.

11. Configure your Capture application settings

Registration includes a password recovery workflow and an email verification workflow. These correspond to the verify.html/js and forgot.html/js files in your janrain-capture-screens folder. The links that are generated and included in the emails sent to end users through these workflows are configured in your Janrain Capture Dashboard under Settings. You need to configure the following settings for the API client that you are using on your Drupal site:

Troubleshooting Tips