Closed (fixed)
Project:
OneAll Social Login
Version:
7.x-1.5
Component:
User interface
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
15 Jan 2013 at 19:50 UTC
Updated:
6 May 2020 at 02:17 UTC
Jump to comment: Most recent
Comments
Comment #1
ben finklea commentedYes! This is a must.
Comment #2
indra2009 commentedis it done already? or we have to do it manually??
Comment #3
arne.olafson commentedLooks like their support has updated this on their forum site:
https://support.oneall.com/forums/discussion/comment/3513/#Comment_3513
In file: (your drupal base directory)/modules/social_login/social_login_core.module
At approx. line: 880, after these lines:
// Prepopulate.
$form['account']['name']['#default_value'] = $user_login;
$form['account']['mail']['#default_value'] = $user_email;
Add this code:
// User fields (depends on name defined in the administration setup!):
$user_firstname = empty($identity['name']['givenName']) ? '' : $identity['name']['givenName'];
$user_lastname = empty($identity['name']['familyName']) ? '' : $identity['name']['familyName'];
$form['field_first_name'][LANGUAGE_NONE][0]['value']['#default_value'] = $user_firstname;
$form['field_last_name'][LANGUAGE_NONE][0]['value']['#default_value'] = $user_lastname;
Warning: this assumes you called the first and last names: First Name, Last Name,
when adding the custom fields via the User Fields pages.
Comment #4
ClaudeSchlesser commentedThe mapping is available using Drupal rules:
http://docs.oneall.com/plugins/guide/social-login-drupal/7/#3
Comment #5
tory-w commentedTo ClaudeSchlesser,
I also saw your response to a similar issue called, Profile Data Mapping, which was to defer to the SocialOneAll Drupal Rules information. I'm going to try to clear up what I think people mean.
It is simple to map a text field. For example, I have created a field for a user's real name and then use the Real name and Name Field modules to manipulate the data how I would like to. However, the issue with the mapping instructions via OneAll becomes a problem for a field such as a "date" field (e.g. - Birthday). It would appear Rules doesn't figure out what type of field (text, date, file, user picture, etc) SocialOneAll is importing, and defers to text data fields; thus, I can populate my names, but not a birth date.
I hope this makes sense....
I am going to try #3. Thanks all!
Comment #6
Listwithatwist commentedFound a solution with #4, with a difference in the rule from link. Left the conditions empty and used "actions" - set a data value, and matched the [oneall-identity-givenname:value] to the field you create...any text field.