Anonymization Of Learner Registration Data

Starting in the Bright for WordPress Plugin version 9.6, it is possible to override the default behavior of Bright in terms of user data associated with a registration created in SCORM Cloud.

By default, the registration is created with:

  • a learner id corresponding to the user's email address.
  • a first name matching the first name in the user's WordPress account.
  • a last name matching the last name in the user's WordPress account.
  • an email address corresponding the user's email address. This enables the learner to launch and/or view their registration data directly from the SCORM Cloud website.

To override this behavior, define the following in a Javascript file loaded onto your page:

BrightPluggable.create_registration_data = function(data) {
  data.learner_id = bright_learner_id;
  data.fname = 'anonymous'
  data.lname = 'anonymous'
  data.remove_personal_data = true
  return data;

In this example, bright_learner_id is something that you define elsewhere in your page, for example via:

add_action('wp_footer', function () {
    $user_id = get_current_user_id();
    echo <<<EOF
  var bright_learner_id = {$user_id};

In this case, we just use our WordPress user ID as the SCORMCloud learner_id.

Also note, you can override both the first name and last name. To suppress supplying the email address to SCORMCloud, set the remove_personal_data parameter to any value.

By default, Bright will sync your WordPress User Profile fields that you assign in the plugin settings [see ] to the associated realm user record in Bright.

You can suppress this on a field to field basis from Javascript on the page in question:

// This function is called before the realm_user/gcustom callback is called.
// Let's remove any PII ....
BrightPluggable.filter_usermeta = function(data) {
  let host =;
  delete data[host].first_name;
  delete data[host].last_name;
  delete data[host].company;
  return data;