I am trying to map data to my user fields on registration.
I know that links have been provided to OneAll's instructions, and I have Rules Forms module installed, but the instructions are missing a key ingredient in my opinion. How do i bring all the information i need into scope? Oneall user Registration brings in the user data, but when I try to add a value "Set the default value" of a form element, there are none in drop down menu. The only way I've found to make those available is to base my rule on the even "User profile form is being built", but if my event is trigger by this even instead the OneAll information isn't available. Perhaps it is, in the chain of tokens, but I cannot locate the other starting for an either event.

Also, i noticed my first and last name fields pre-populated when i added them to User. Is there a list of naming conventions for the rest of the info OneAll returns so more user field will pre-populate?

Comments

cardamomclouds created an issue. See original summary.

cardamomclouds’s picture

Never mind, this is much more easily achieved programmatically. Line 1028 of social_login_core.module Give an example of how.

Sinan Erdem’s picture

Version: 7.x-1.9 » 8.x-1.6

How is this achieved in the D8 version?

I am trying to get linkedin url, and name of the user.

ClaudeSchlesser’s picture

There is currently only an Alpha release for the Drupal 8 Rules module:
https://www.drupal.org/project/rules

As soon as they release a stable version, we will also implement the Rules usage in our D8 plugin.

At the moment you can map the fields by modifying the SocialLoginController.php

This part:

// Setup the user fields.

$user_fields = [
  'name' => $user_login,
  'mail' => $user_email,
  'pass' => $user_password,
  'status' => $user_status,
  'init' => $user_email,
  'roles' => $user_roles
];

 // Create a new user.
 $account = \Drupal\user\Entity\User::create($user_fields);
 $account->save();
ClaudeSchlesser’s picture

Status: Active » Postponed
ClaudeSchlesser’s picture

Status: Postponed » Fixed

We have now added events that can be used to map custom data.

Here an example subscriber:
https://github.com/oneall/social-login-drupal-events

ClaudeSchlesser’s picture

Status: Fixed » Closed (fixed)